@Test
public void deserializeAclEntryModifiedV1() {

    final JsonObject eventJson = JsonFactory.newObjectBuilder()
            .set("event", "thingAclEntryModified")
            .set("__schemaVersion", 1)
            .set("payload", JsonFactory.newObjectBuilder()
                    .set("thingId", TestConstants.Thing.THING_ID.toString())
                    .set("aclEntry", TestConstants.Authorization.ACL_ENTRY_OLDMAN.toJson(JsonSchemaVersion.V_1))
                    .set("created", false)
                    .build())
            .build();
    final Object object = toDbObject(eventJson);
    final Object actual = underTest.fromJournal(object, null).events().head();
    assertThat(actual).isInstanceOf(ThingEvent.class);
    final ThingEvent event = (ThingEvent) actual;
    assertThat((CharSequence) event.getThingEntityId()).isEqualTo(TestConstants.Thing.THING_ID);
    assertThat(event.getName()).isEqualTo(AclEntryModified.NAME);
    assertThat(event.getType()).isEqualTo(AclEntryModified.TYPE);
    assertThat(event).isInstanceOf(AclEntryModified.class);
    final AclEntryModified aclEntryModified = (AclEntryModified) event;
    assertThat((CharSequence) aclEntryModified.getThingEntityId()).isEqualTo(TestConstants.Thing.THING_ID);
    assertThat(aclEntryModified.getAclEntry().toJsonString())
            .isEqualTo(TestConstants.Authorization.ACL_ENTRY_OLDMAN.toJsonString());
}