### Question:
StringToUniqueIntegerMap extends SimpleStoredMap<Integer> { public int register(String key) { Integer id = store.get(key); if (id != null) { return id; } int localId = nextId.getAndIncrement(); while (localId < maxId) { if (store.setIfAbsent(key, localId)) { return localId; } Integer storeId = store.get(key); if (storeId != null) { return storeId; } localId = nextId.getAndIncrement(); } throw new IllegalStateException("StringMap id space exhausted"); } StringToUniqueIntegerMap(String name);  StringToUniqueIntegerMap(String name, int maxId);  StringToUniqueIntegerMap(StringToUniqueIntegerMap parent, SimpleStore<Integer> store, int minId, int maxId, String name); int convertToParent(int localId); int convertTo(StringToUniqueIntegerMap other, int localId); int convertFrom(StringToUniqueIntegerMap other, int foreignId); int register(String key); boolean register(String key, int id); @Override String getString(Integer value); @Override Integer getValue(String key); @Override boolean save(); @Override Collection<String> getKeys(); @Override List<Pair<Integer, String>> getItems(); @Override void clear();  }### Answer:
@Test (expected = IllegalStateException.class) public void mapOverflow() { fillServerMap(); serverMap.register("overflowKey"); }
@Test (expected = IllegalArgumentException.class) public void ManualRegisterOutOfMinRange() { world1Map.register("some.block.name1", minValue + 1); }
@Test (expected = IllegalArgumentException.class) public void ManualRegisterOutOfMaxRange() { world1Map.register("some.block.name2", maxValue + 1); }