* Java interface.
*
* @param componentName
*/
private void testClientUsingUserProvidedInterface(String componentName) {
TScenarioOne component = domain.getService(TScenarioOne.class, componentName);
TRichStruct tRichStruct = getTRichStruct();
try {
TRichStruct result = component.setRichStruct(tRichStruct);
assertTrue(equalTo(result, tRichStruct));
} catch (Exception e) {
fail();
}
try {
tRichStruct.longField = 0;
component.setRichStruct(tRichStruct);
fail();
} catch (Exception e) {
assertTrue(e instanceof UnexpectedException);
}
try {
tRichStruct.longField = 1;
tRichStruct.innerStruct.color = TColor.red;
component.setRichStruct(tRichStruct);
} catch (Exception e) {
assertTrue(e instanceof WrongColor);
}
}