PurgeEntitiesReason implements ShutdownReason { public static PurgeEntitiesReason of(final List<EntityId> entityIdsToPurge) { final List<String> stringEntityIdsToPurge = argumentNotEmpty(entityIdsToPurge, "entities to purge") .stream() .map(String::valueOf) .collect(Collectors.toList()); return new PurgeEntitiesReason(stringEntityIdsToPurge); } private  PurgeEntitiesReason(final List<String> entityIdsToPurge); static PurgeEntitiesReason of(final List<EntityId> entityIdsToPurge); @Override ShutdownReasonType getType(); @Override boolean isRelevantFor(final Object value); @Override JsonObject toJson(); @Override JsonObject toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> predicate); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void tryToGetInstanceWithEmptyNamespace() { assertThatIllegalArgumentException() .isThrownBy(() -> PurgeNamespaceReason.of("")) .withMessageContaining("namespace") .withMessageContaining("not be empty") .withNoCause(); }