assertFalse(map.containsValue((short) 23));
}
@Test
public void testForEachKey() {
final CharArrayList keys = new CharArrayList();
HashCharShortMap map = newMutableMap();
map.put((char) 11, (short) 22);
map.put((char) 12, (short) 23);
map.put((char) 13, (short) 24);
map.put((char) 14, (short) 25);
map.remove((char) 13);
map.keySet().forEachWhile(new CharPredicate() {
@Override
public boolean test(char element) {
keys.add(element);
return true;
}
});
char[] keysArray = keys.toArray(new char[keys.size()]);
Arrays.sort(keysArray);
assertArrayEquals(new char[] {11, 12, 14}, keysArray /* keyEpsilon */);
}