DefaultHazelcastBucketManagerFactory implements HazelcastBucketManagerFactory { @Override public <T> Set<T> getSet(String bucketName, Class<T> clazz) { requireNonNull(bucketName, "bucketName is required"); requireNonNull(clazz, "clazz is required"); return hazelcastInstance.getSet(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 shouldReturnSet() { Set<String> set = managerFactory.getSet("set_sample", String.class); assertNotNull(set); }
@Test public void shouldReturnErrorWhenNullParameterSet() { assertThrows(NullPointerException.class, () -> managerFactory.getSet(null, String.class)); }
@Test public void shouldReturnSetHazelcast() { Set<String> set = managerFactory.getSet("set_sample"); assertNotNull(set); }
@Test public void shouldReturnErrorWhenNullParameterSetHazelcast() { assertThrows(NullPointerException.class, () -> managerFactory.getSet(null)); }