@Test
public void fromJsonWithUnknownType() {

    final JsonObject shutdownReasonWithUnknownType = purgeEntitiesReasonJson.toBuilder()
            .set(ShutdownReason.JsonFields.TYPE, "fooBar")
            .build();
    assertThat(ShutdownReasonFactory.fromJson(shutdownReasonWithUnknownType)).isEqualTo(ShutdownNoReason.INSTANCE);
}