ModifyAcl extends AbstractCommand<ModifyAcl> implements ThingModifyCommand<ModifyAcl> { @Deprecated public static ModifyAcl of(final String thingId, final AccessControlList accessControlList, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), accessControlList, dittoHeaders); } private  ModifyAcl(final AccessControlList accessControlList, final ThingId thingId,
            final DittoHeaders dittoHeaders); @Deprecated static ModifyAcl of(final String thingId, final AccessControlList accessControlList,
            final DittoHeaders dittoHeaders); static ModifyAcl of(final ThingId thingId, final AccessControlList accessControlList,
            final DittoHeaders dittoHeaders); static ModifyAcl fromJson(final String jsonString, final DittoHeaders dittoHeaders); static ModifyAcl fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); AccessControlList getAccessControlList(); @Override ThingId getThingEntityId(); @Override Optional<JsonValue> getEntity(final JsonSchemaVersion schemaVersion); @Override JsonPointer getResourcePath(); @Override Category getCategory(); @Override ModifyAcl setDittoHeaders(final DittoHeaders dittoHeaders); @Override boolean changesAuthorization(); @Override int hashCode(); @SuppressWarnings({"squid:MethodCyclomaticComplexity", "squid:S1067", "OverlyComplexMethod"}) @Override boolean equals(@Nullable final Object obj); @Override String toString(); static final String NAME; static final String TYPE; }
@Test(expected = ThingIdInvalidException.class) public void tryToCreateInstanceWithNullThingIdString() { ModifyAcl.of((String) null, TestConstants.Thing.ACL, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullThingId() { ModifyAcl.of((ThingId) null, TestConstants.Thing.ACL, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullAcl() { ModifyAcl.of(TestConstants.Thing.THING_ID, null, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final ModifyAcl underTest = ModifyAcl.of(TestConstants.Thing.THING_ID, TestConstants.Thing.ACL, TestConstants.EMPTY_DITTO_HEADERS); final JsonObject actualJson = underTest.toJson(JsonSchemaVersion.V_1, FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }