/**
* Test passing (and getting as result) simple two-field structure
*/
@Test
public void test_TestObject_setSimpleStruct() {
SimpleStruct struct = new SimpleStruct();
struct.field1 = TestConstants.STR_1;
struct.field2 = TestConstants.INT_1;
DynaCorbaRequest request = new DynaCorbaRequest(refTestObject, "setSimpleStruct");
try {
request.setOutputType(SimpleStruct.class);
request.addArgument(struct);
DynaCorbaResponse response = request.invoke();
SimpleStruct retStruct = (SimpleStruct)response.getContent();
assertTrue(retStruct.field1.equals(struct.field1) && retStruct.field2 == struct.field2);
} catch (Exception e) {
e.printStackTrace();
fail("Exception occured during tests: " + e);
}