@Test public void testUnmarshallFromXml() throws JAXBException { // Act ruleExecutionContainer = marshaller.unmarshalFromXml(RuleExecutionContainer.class, ruleExecutionContainerString); String[] results = new String[2]; int i = 0; for (RuleExecutionResponse r : ruleExecutionContainer.getExecutionResponseList()) { String s = ruleExecutionResponseToString(r); results[i] = s; logger.debug(s); i++; } // Assert assertNotNull(ruleExecutionContainer); assertEquals(2, ruleExecutionContainer.getExecutionResponseList().size()); assertEquals(EXPECTED_RESPONSE_1, results[0]); assertEquals(EXPECTED_RESPONSE_2, results[1]); }
private RuleExecutionContainer createRuleExecutionContainer() { RuleExecutionContainer r = new RuleExecutionContainer(); r.setExecutionResponseList(new LinkedList<RuleExecutionResponse>()); return r; }