### Question:
StreamHelper { static <K, V> IMap<K, V> getMap(HazelcastInstance instance, String mapFQName, StreamConfig streamConfig, MapStoreConfig mapStoreConfig) { final MapConfig mapConfig = new MapConfig(mapFQName) .setBackupCount(streamConfig.getSyncReplicas()) .setAsyncBackupCount(streamConfig.getAsyncReplicas()) .setMapStoreConfig(mapStoreConfig); instance.getConfig().addMapConfig(mapConfig); return instance.getMap(mapFQName); } private  StreamHelper();   }### Answer:
@Test public void testGetMap() { final HazelcastInstance instance = mock(HazelcastInstance.class); final Config config = new Config(); when(instance.getConfig()).thenReturn(config); final MapStoreConfig mapStoreConfig = new MapStoreConfig() .setEnabled(true) .setClassName("TestClass"); final StreamConfig streamConfig = new StreamConfig() .withName("stream") .withAsyncReplicas(3) .withSyncReplicas(2) .withHeapCapacity(100); StreamHelper.getMap(instance, "map", streamConfig, mapStoreConfig); final MapConfig m = config.getMapConfig("map"); assertEquals(streamConfig.getAsyncReplicas(), m.getAsyncBackupCount()); assertEquals(streamConfig.getSyncReplicas(), m.getBackupCount()); assertEquals(mapStoreConfig, m.getMapStoreConfig()); }