RetrieveAclEntryResponse extends AbstractCommandResponse<RetrieveAclEntryResponse> implements
        ThingQueryCommandResponse<RetrieveAclEntryResponse> { @Deprecated public static RetrieveAclEntryResponse of(final String thingId, final AclEntry aclEntry, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), aclEntry, dittoHeaders); } private  RetrieveAclEntryResponse(final ThingId thingId,
            final HttpStatusCode statusCode,
            final String aclEntrySubject,
            final JsonObject aclEntryPermissions,
            final DittoHeaders dittoHeaders); @Deprecated static RetrieveAclEntryResponse of(final String thingId, final AclEntry aclEntry,
            final DittoHeaders dittoHeaders); static RetrieveAclEntryResponse of(final ThingId thingId, final AclEntry aclEntry,
            final DittoHeaders dittoHeaders); static RetrieveAclEntryResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders); static RetrieveAclEntryResponse fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override ThingId getThingEntityId(); AclEntry getAclEntry(); @Override JsonValue getEntity(final JsonSchemaVersion schemaVersion); @Override RetrieveAclEntryResponse setEntity(final JsonValue entity); @Override RetrieveAclEntryResponse setDittoHeaders(final DittoHeaders dittoHeaders); @Override JsonPointer getResourcePath(); @Override JsonSchemaVersion[] getSupportedSchemaVersions(); @Override boolean equals(@Nullable final Object o); @Override int hashCode(); @Override String toString(); static final String TYPE; }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullAclEntry() { RetrieveAclEntryResponse.of(TestConstants.Thing.THING_ID, null, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final RetrieveAclEntryResponse underTest = RetrieveAclEntryResponse.of(TestConstants.Thing.THING_ID, TestConstants.Authorization.ACL_ENTRY_OLDMAN, TestConstants.EMPTY_DITTO_HEADERS); final JsonObject actualJson = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }