UnblockNamespace extends AbstractNamespaceCommand<UnblockNamespace> { public static UnblockNamespace fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders) { return new CommandJsonDeserializer<UnblockNamespace>(TYPE, jsonObject).deserialize(() -> { final String namespace = jsonObject.getValueOrThrow(NamespaceCommand.JsonFields.NAMESPACE); return new UnblockNamespace(namespace, dittoHeaders); }); } private  UnblockNamespace(final CharSequence namespace, final DittoHeaders dittoHeaders); static UnblockNamespace of(final CharSequence namespace, final DittoHeaders dittoHeaders); static UnblockNamespace fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override UnblockNamespace setDittoHeaders(final DittoHeaders dittoHeaders); @Override String toString(); static final String TYPE; }
@Test public void fromJsonReturnsExpected() { final UnblockNamespace commandFromJson = UnblockNamespace.fromJson(knownJsonRepresentation, dittoHeaders); assertThat(commandFromJson).isEqualTo(underTest); }