@Test public void shouldMarshallObjectToXml() throws Exception { Times times = new TimesBuilder() .creationTime(CalendarHandler.createCalendar(2016, 1, 15)) .expires(true) .expiryTime(CalendarHandler.createCalendar(2016, 1, 16)) .lastAccessTime(CalendarHandler.createCalendar(2016, 1, 17)) .lastModificationTime(CalendarHandler.createCalendar(2016, 1, 18)) .locationChanged(CalendarHandler.createCalendar(2016, 1, 19)) .usageCount(23) .build(); ByteArrayOutputStream bos = new SimpleXmlParser().toXml(times); String xml = XmlStringCleaner.cleanXmlString(new String(bos.toByteArray())); Assert.assertEquals("<times><LastModificationTime>2016-01-18T00:00:00</LastModificationTime><CreationTime>2016-01-15T00:00:00</CreationTime><LastAccessTime>2016-01-17T00:00:00</LastAccessTime><ExpiryTime>2016-01-16T00:00:00</ExpiryTime><Expires>True</Expires><UsageCount>23</UsageCount><LocationChanged>2016-01-19T00:00:00</LocationChanged></times>", xml); }
public boolean expires() { return expires; }
Times { public boolean expires() { return expires; } }
Times { public boolean expires() { return expires; } Times();  Times(TimesContract timesContract); }
Times { public boolean expires() { return expires; } Times();  Times(TimesContract timesContract); Calendar getLastModificationTime(); Calendar getCreationTime(); Calendar getLastAccessTime(); Calendar getExpiryTime(); boolean expires(); int getUsageCount(); Calendar getLocationChanged(); @Override final int hashCode(); @Override final boolean equals(Object obj); @Override String toString(); }
Times { public boolean expires() { return expires; } Times();  Times(TimesContract timesContract); Calendar getLastModificationTime(); Calendar getCreationTime(); Calendar getLastAccessTime(); Calendar getExpiryTime(); boolean expires(); int getUsageCount(); Calendar getLocationChanged(); @Override final int hashCode(); @Override final boolean equals(Object obj); @Override String toString();  }