List of usage examples for org.springframework.batch.item.xml.domain QualifiedTrade QualifiedTrade
public QualifiedTrade(String isin, long quantity, BigDecimal price, String customer)
From source file:org.springframework.batch.item.xml.Jaxb2NamespaceMarshallingTests.java
protected Marshaller getMarshaller() throws Exception { Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); marshaller.setClassesToBeBound(new Class<?>[] { QualifiedTrade.class }); marshaller.afterPropertiesSet();/*from w ww . j ava 2s . com*/ StringWriter string = new StringWriter(); marshaller.marshal(new QualifiedTrade("FOO", 100, BigDecimal.valueOf(10.), "bar"), new StreamResult(string)); String content = string.toString(); assertTrue("Wrong content: " + content, content.contains("<customer>bar</customer>")); return marshaller; }