RetrieveAclResponse extends AbstractCommandResponse<RetrieveAclResponse> implements
        ThingQueryCommandResponse<RetrieveAclResponse> { @Deprecated public static RetrieveAclResponse of(final String thingId, final JsonObject acl, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), acl, dittoHeaders); } private  RetrieveAclResponse(final ThingId thingId, final HttpStatusCode statusCode, final JsonObject acl,
            final DittoHeaders dittoHeaders); @Deprecated static RetrieveAclResponse of(final String thingId, final JsonObject acl,
            final DittoHeaders dittoHeaders); static RetrieveAclResponse of(final ThingId thingId, final JsonObject acl,
            final DittoHeaders dittoHeaders); @Deprecated static RetrieveAclResponse of(final String thingId, final AccessControlList acl,
            final DittoHeaders dittoHeaders); static RetrieveAclResponse of(final ThingId thingId, final AccessControlList acl,
            final DittoHeaders dittoHeaders); static RetrieveAclResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders); static RetrieveAclResponse fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override ThingId getThingEntityId(); AccessControlList getAcl(); @Override JsonValue getEntity(final JsonSchemaVersion schemaVersion); @Override RetrieveAclResponse setEntity(final JsonValue entity); @Override RetrieveAclResponse 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 tryToCreateInstanceWithNullAcl() { RetrieveAclResponse.of(TestConstants.Thing.THING_ID, (AccessControlList) null, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullJsonObject() { RetrieveAclResponse.of(TestConstants.Thing.THING_ID, (JsonObject) null, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final RetrieveAclResponse underTest = RetrieveAclResponse.of(TestConstants.Thing.THING_ID, TestConstants.Thing.ACL, TestConstants.EMPTY_DITTO_HEADERS); final JsonObject actualJson = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }