use of org.killbill.billing.account.api.DefaultChangedField in project killbill by killbill.
the class TestEventJson method testDefaultAccountChangeEvent.
@Test(groups = "fast", description = "Test Account event deserialization")
public void testDefaultAccountChangeEvent() throws Exception {
final List<ChangedField> changes = new ArrayList<ChangedField>();
changes.add(new DefaultChangedField("fieldXX", "valueX", "valueXXX", clock.getUTCNow()));
changes.add(new DefaultChangedField("fieldYY", "valueY", "valueYYY", clock.getUTCNow()));
final AccountChangeInternalEvent e = new DefaultAccountChangeEvent(changes, UUID.randomUUID(), 1L, 2L, null);
final String json = mapper.writeValueAsString(e);
final Class<?> claz = Class.forName("org.killbill.billing.account.api.user.DefaultAccountChangeEvent");
final Object obj = mapper.readValue(json, claz);
Assert.assertTrue(obj.equals(e));
}
Aggregations