DefaultHazelcastBucketManagerFactory implements HazelcastBucketManagerFactory { @Override public <K, V> Map<K, V> getMap(String bucketName, Class<K> keyValue, Class<V> valueValue) { requireNonNull(bucketName, "bucketName is required"); requireNonNull(keyValue, "keyValue is required"); requireNonNull(valueValue, "valueValue is required"); return hazelcastInstance.getMap(bucketName); } DefaultHazelcastBucketManagerFactory(HazelcastInstance hazelcastInstance); @Override HazelcastBucketManager getBucketManager(String bucketName); @Override List<T> getList(String bucketName, Class<T> clazz); @Override Set<T> getSet(String bucketName, Class<T> clazz); @Override Queue<T> getQueue(String bucketName, Class<T> clazz); @Override Map<K, V> getMap(String bucketName, Class<K> keyValue, Class<V> valueValue); @Override void close(); @Override List<T> getList(String bucketName); @Override Set<T> getSet(String bucketName); @Override Queue<T> getQueue(String bucketName); @Override Map<K, V> getMap(String bucketName);  }
@Test public void shouldReturnMap() { Map<String, String> map = managerFactory.getMap("map_sample", String.class, String.class); assertNotNull(map); }
@Test public void shouldReturnErrorWhenNullParameterMap() { assertThrows(NullPointerException.class, () -> managerFactory.getMap(null, String.class, String.class)); }
@Test public void shouldReturnMapHazelcast() { Map<String, String> map = managerFactory.getMap("map_sample"); assertNotNull(map); }
@Test public void shouldReturnErrorWhenNullParameterMapHazelcast() { assertThrows(NullPointerException.class, () -> managerFactory.getMap(null)); }