### Question:
AbstractRegistry implements Registry<K, V> { @Override public void bind(K name, V value) throws AlreadyBoundException { if (storage.containsKey(name)) { throw new AlreadyBoundException(name + "is already bound"); } storage.put(name, value); }  @Override V lookup(K name); @Override void bind(K name, V value); @Override void unbind(K name); @Override Set<K> listBound();  }### Answer:
@Test(expectedExceptions = AlreadyBoundException.class) public void doNotBoundTwice() throws Exception { registry.bind(KEY, VALUE); registry.bind(KEY, "another value 123!@#"); }