* interface.
*
* @param componentName
*/
private void testClientUsingGeneratedInterface(String componentName) {
ScenarioOneOperations component = domain.getService(ScenarioOneOperations.class, componentName);
RichStruct richStruct = getRichStruct();
try {
RichStruct result = component.setRichStruct(richStruct);
assertTrue(equalTo(result, richStruct));
} catch (Exception e) {
e.printStackTrace();
fail();
}
try {
richStruct.longField = 0;
component.setRichStruct(richStruct);
fail();
} catch (Exception e) {
assertTrue(e instanceof UnexpectedException);
}
try {
richStruct.longField = 1;
richStruct.innerStruct.color = Color.red;
component.setRichStruct(richStruct);
} catch (Exception e) {
assertTrue(e instanceof WrongColor);
}
}