DeleteAclEntry extends AbstractCommand<DeleteAclEntry> implements ThingModifyCommand<DeleteAclEntry> { @Deprecated public static DeleteAclEntry of(final String thingId, final AuthorizationSubject authorizationSubject, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), authorizationSubject, dittoHeaders); } private  DeleteAclEntry(final AuthorizationSubject authorizationSubject, final ThingId thingId,
            final DittoHeaders dittoHeaders); @Deprecated static DeleteAclEntry of(final String thingId, final AuthorizationSubject authorizationSubject,
            final DittoHeaders dittoHeaders); static DeleteAclEntry of(final ThingId thingId, final AuthorizationSubject authorizationSubject,
            final DittoHeaders dittoHeaders); static DeleteAclEntry fromJson(final String jsonString, final DittoHeaders dittoHeaders); static DeleteAclEntry fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); AuthorizationSubject getAuthorizationSubject(); @Override ThingId getThingEntityId(); @Override JsonPointer getResourcePath(); @Override Category getCategory(); @Override DeleteAclEntry setDittoHeaders(final DittoHeaders dittoHeaders); @Override boolean changesAuthorization(); @Override int hashCode(); @SuppressWarnings("squid:MethodCyclomaticComplexity") @Override boolean equals(@Nullable final Object obj); @Override String toString(); static final String NAME; static final String TYPE; }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullAuthorizationSubject() { DeleteAclEntry.of(TestConstants.Thing.THING_ID, null, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final DeleteAclEntry underTest = DeleteAclEntry.of(TestConstants.Thing.THING_ID, TestConstants.Authorization.AUTH_SUBJECT_GRIMES, TestConstants.EMPTY_DITTO_HEADERS); final JsonObject actualJson = underTest.toJson(JsonSchemaVersion.V_1, FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }