@Test
public void fromInvalidJsonFails() {

    final JsonObject INVALID_JSON = KNOWN_JSON.remove(Connection.JsonFields.SOURCES.getPointer())
            .remove(Connection.JsonFields.TARGETS.getPointer());
    assertThatExceptionOfType(ConnectionConfigurationInvalidException.class)
            .isThrownBy(() -> ImmutableConnection.fromJson(INVALID_JSON))
            .withMessageContaining("source")
            .withMessageContaining("target")
            .withNoCause();
}