### Question:
AbbreviationMap implements OptionNameMap<V> { @Override public void put( String key, V newValue ) { if ( newValue == null ) throw new NullPointerException(); if ( key.length() == 0 ) throw new IllegalArgumentException(); char[] chars = charsOf(key); add( chars, newValue, 0, chars.length ); }  @Override boolean contains(String key); @Override V get( String key ); @Override void put( String key, V newValue ); @Override void putAll( Iterable<String> keys, V newValue ); @Override void remove( String key ); @Override Map<String, V> toJavaUtilMap();  }### Answer:
@Test( expected = NullPointerException.class ) public void nullValuesAreIllegal() { abbreviations.put( "cannotAddNullValue", null ); }
@Test( expected = NullPointerException.class ) public void nullKeysAreIllegalToAdd() { abbreviations.put( null, "-1" ); }
@Test( expected = IllegalArgumentException.class ) public void zeroLengthKeysAreIllegalToAdd() { abbreviations.put( "", "1" ); }