MemcachedBucketManagerFactory implements BucketManagerFactory { @Override public Map getMap(String bucketName, Class keyValue, Class valueValue) { throw new UnsupportedOperationException("This method is not supported"); } MemcachedBucketManagerFactory(MemcachedClient client); @Override MemcachedBucketManager getBucketManager(String bucketName); @Override void close(); @Override Map getMap(String bucketName, Class keyValue, Class valueValue); @Override Queue getQueue(String bucketName, Class clazz); @Override Set getSet(String bucketName, Class clazz); @Override List getList(String bucketName, Class clazz);  }
@Test public void shouldReturnErrorMap() { assertThrows(UnsupportedOperationException.class, () -> managerFactory.getMap(null, String.class, String.class)); }