protected static TestComponent testComponent() {
return testComponent(TEST_STRING_1, false);
}
protected static TestComponent testComponent(String stringValue, boolean populateOptionalProperties) {
TestComponent component = new TestComponent();
if (populateOptionalProperties) {
component.setBinaryProp(TEST_BINARY);
component.setBooleanProp(TEST_BOOLEAN);
component.setByteProp(TEST_BYTE);
component.setDatetimeProp(TEST_DATETIME);
component.setDoubleProp(TEST_DOUBLE);
component.setEmbeddedListProp(TEST_EMBEDDEDLIST);
component.setEmbeddedMapProp(TEST_EMBEDDEDMAP);
component.setEmbeddedSetProp(TEST_EMBEDDEDSET);
component.setFloatProp(TEST_FLOAT);
component.setIntegerProp(TEST_INTEGER);
component.setLongProp(TEST_LONG);
component.setShortProp(TEST_SHORT);
component.setUnregisteredProp(TEST_UNREGISTERED);
}
component.setStringProp(stringValue);
return component;
}