private void checkMapContents(MapFromStringToBoolean map, String[] keys, boolean[] values) {
keys = Arrays.copyOf(keys, keys.length);
Arrays.sort(keys);
ArrayOfString mapKeys = map.keys();
mapKeys.sort();
assertSamelitude(keys, mapKeys);
// We can't sort boolean array so we just compare true values count.
ArrayOfBoolean mapValues = map.values();
assertEquals(values.length, mapValues.length());