@Test public void testUnmarshallFromXml() throws JAXBException { ruleExecutionContainer = marshaller.unmarshalFromXml( RuleExecutionContainer.class, ruleExecutionContainerString); final String[] results = new String[2]; int i = 0; for (final RuleExecutionResponse r : ruleExecutionContainer .getExecutionResponseList()) { final String s = ruleExecutionResponseToString(r); results[i] = s; logger.debug(s); i++; } assertNotNull(ruleExecutionContainer); assertEquals(2, ruleExecutionContainer.getExecutionResponseList() .size()); assertEquals(EXPECTED_RESPONSE_1, results[0]); assertEquals(EXPECTED_RESPONSE_2, results[1]); }
@Override public <T> T unmarshalFromXml(Class<T> clazz, String xml) throws SimpleMarshallerException { JAXBContext context; try { context = JAXBContext.newInstance(clazz); } catch (final JAXBException e) { throw new SimpleMarshallerException(e); } return unmarshalFromXml(context, clazz, xml); }
SimpleMarshallerImpl implements SimpleMarshaller { @Override public <T> T unmarshalFromXml(Class<T> clazz, String xml) throws SimpleMarshallerException { JAXBContext context; try { context = JAXBContext.newInstance(clazz); } catch (final JAXBException e) { throw new SimpleMarshallerException(e); } return unmarshalFromXml(context, clazz, xml); } }
SimpleMarshallerImpl implements SimpleMarshaller { @Override public <T> T unmarshalFromXml(Class<T> clazz, String xml) throws SimpleMarshallerException { JAXBContext context; try { context = JAXBContext.newInstance(clazz); } catch (final JAXBException e) { throw new SimpleMarshallerException(e); } return unmarshalFromXml(context, clazz, xml); }  }
SimpleMarshallerImpl implements SimpleMarshaller { @Override public <T> T unmarshalFromXml(Class<T> clazz, String xml) throws SimpleMarshallerException { JAXBContext context; try { context = JAXBContext.newInstance(clazz); } catch (final JAXBException e) { throw new SimpleMarshallerException(e); } return unmarshalFromXml(context, clazz, xml); }  @Override String marshal(Object obj); @Override ByteArrayOutputStream marshalAsByteArrayOutputStream(Object obj); @SuppressWarnings("unchecked") @Override String marshalWithoutRootElement(T obj); @Override T unmarshalFromXml(Class<T> clazz, String xml); }
SimpleMarshallerImpl implements SimpleMarshaller { @Override public <T> T unmarshalFromXml(Class<T> clazz, String xml) throws SimpleMarshallerException { JAXBContext context; try { context = JAXBContext.newInstance(clazz); } catch (final JAXBException e) { throw new SimpleMarshallerException(e); } return unmarshalFromXml(context, clazz, xml); }  @Override String marshal(Object obj); @Override ByteArrayOutputStream marshalAsByteArrayOutputStream(Object obj); @SuppressWarnings("unchecked") @Override String marshalWithoutRootElement(T obj); @Override T unmarshalFromXml(Class<T> clazz, String xml);  }