@Override
    public String typeForDataConnection(String name) {
        DataConnectionEntry dataConnection = dataConnections.get(name);
        if (dataConnection == null) {
            throw new HazelcastException("Data connection '" + name + "' not found");
        }
        String type = dataConnectionClassToType.get(dataConnection.instance.getClass());
        if (type == null) {
            throw new HazelcastException("Data connection type for class '" + dataConnection.getClass() + "' is not known");
        }
        return type;
    }
@Test
    public void type_for_data_connection_should_throw_when_data_connection_does_not_exist() {
        assertThatThrownBy(() -> dataConnectionService.typeForDataConnection("non-existing-data-connection"))
                .isInstanceOf(HazelcastException.class)
                .hasMessage("Data connection 'non-existing-data-connection' not found");
    }