@Override public String toString() { return ObjectUtils.toString(this); } }
/** * Generates a unique id for an artifact (domain or application). * * @return {@link String} a uniqueId */ public String getUniqueIdString(String type) { return TOOLING_PREFIX + "-" + type + "-" + UUID.getUUID(); }
public void setEnabledProtocols(String enabledProtocols) { this.enabledProtocols = StringUtils.splitAndTrim(enabledProtocols, ","); }
private void deleteFtpServerBaseDir() { FileUtils.deleteTree(baseDir); }
@Test(expected = NoSuchFieldException.class) public void getUnexistentFieldValueRecursive() throws Exception { ClassUtils.getFieldValue(new ExtendedHashBlob(1), "fake", true); }
@Test(expected = NoSuchFieldException.class) public void getUnexistentFieldValue() throws Exception { ClassUtils.getFieldValue(new HashBlob(0), "fake", false); }
@Test public void toStringOnObjectShouldReturnObjectsToStringRepresentation() { // this class uses the default toString implementation Object test = new TestObject("Ernie"); String result = StringMessageUtils.toString(test); assertEquals(test.toString(), result); // this class has a custom toString implementation test = new AnotherTestObject("Bert"); result = StringMessageUtils.toString(test); assertEquals("Bert", result); }
@Test(expected = NoSuchFieldException.class) public void setUnexistentFieldValueRecursive() throws Exception { ClassUtils.setFieldValue(new ExtendedHashBlob(1), "fake", 0, true); }
@Test(expected = NoSuchFieldException.class) public void setUnexistentFieldValue() throws Exception { ClassUtils.setFieldValue(new HashBlob(0), "fake", 0, false); }
@Test public void testHash() { Object a = new HashBlob(1); Object b = new HashBlob(2); assertTrue(ClassUtils.hash(new Object[] {a, b, a, b}) == ClassUtils.hash(new Object[] {a, b, a, b})); assertFalse(ClassUtils.hash(new Object[] {a, b, a}) == ClassUtils.hash(new Object[] {a, b, a, b})); assertFalse(ClassUtils.hash(new Object[] {a, b, a, a}) == ClassUtils.hash(new Object[] {a, b, a, b})); assertFalse(ClassUtils.hash(new Object[] {b, a, b, a}) == ClassUtils.hash(new Object[] {a, b, a, b})); }
@Override public String toString() { return getName(); } }
@Override public String getUniqueIdString() { return getUUID(); }
@Override public String toString() { return ObjectUtils.toString(this); } }
@Test(expected = NoSuchFieldException.class) public void getInheritedFieldValueWithoutRecurse() throws Exception { ClassUtils.getFieldValue(new ExtendedHashBlob(1), "hash", false); }
@Test(expected = NoSuchFieldException.class) public void setInheritedFieldValueWithoutRecurse() throws Exception { ClassUtils.setFieldValue(new ExtendedHashBlob(1), "hash", 0, false); }
public void setEnabledCipherSuites(String enabledCipherSuites) { this.enabledCipherSuites = StringUtils.splitAndTrim(enabledCipherSuites, ","); }
@Override public String toString() { return ObjectUtils.toString(this); }
@Override public String toString() { return ObjectUtils.toString(this); } }
@Override public String toString() { return ObjectUtils.toString(this); }
@Override public String toString() { return ObjectUtils.toString(this); }