@Override
    public V load(K key) {
        awaitSuccessfulInit();

        try (SqlResult queryResult = sqlService.execute(queries.load(), key)) {
            Iterator<SqlRow> it = queryResult.iterator();

            V value = null;
            if (it.hasNext()) {
                SqlRow sqlRow = it.next();
                if (it.hasNext()) {
                    throw new IllegalStateException("multiple matching rows for a key " + key);
                }
                // If there is a single column as the value, return that column as the value
                if (queryResult.getRowMetadata().getColumnCount() == 2 && genericMapStoreProperties.singleColumnAsValue) {
                    value = sqlRow.getObject(1);
                } else {
                    //noinspection unchecked
                    value = (V) toGenericRecord(sqlRow, genericMapStoreProperties);
                }
            }
            return value;
        }
    }
@Test
    public void givenRowAndIdColumn_whenLoad_thenReturnGenericRecord() {
        ObjectSpec spec = objectProvider.createObject(mapName, true);
        objectProvider.insertItems(spec, 1);

        Properties properties = new Properties();
        properties.setProperty(DATA_CONNECTION_REF_PROPERTY, TEST_DATABASE_REF);
        properties.setProperty(ID_COLUMN_PROPERTY, "person-id");
        mapLoader = createMapLoader(properties, hz);
        GenericRecord genericRecord = mapLoader.load(0);

        assertThat(genericRecord.getInt32("person-id")).isZero();
        assertThat(genericRecord.getString("name")).isEqualTo("name-0");
    }