@Test public void testGetForMoreElements() throws Exception { BitSetObjectMap<String> map = new BitSetObjectMap<String>(DEFAULT_VALUE).add(bs(1), "43").add(bs(2, 3, 4), "44"); assertThat(map.get(bs(1)), equalTo("43")); assertThat(map.get(bs(2, 3, 4)), equalTo("44")); assertThat(map.get(bs(0, 8, 15)), equalTo("42")); }
@Test public void testGetForEmptyMap() throws Exception { BitSetObjectMap<String> map = new BitSetObjectMap<String>(DEFAULT_VALUE); assertThat(map.get(bs()), equalTo("42")); assertThat(map.get(bs(0, 8, 15)), equalTo("42")); }
@Test public void testKeys() throws Exception { BitSetObjectMap<String> map = new BitSetObjectMap<String>(DEFAULT_VALUE).add(bs(1), "55"); assertThat(map.keys(), arrayContaining(bs(1))); }
@Test public void testGetDefaultValue() throws Exception { BitSetObjectMap<String> map = new BitSetObjectMap<String>(DEFAULT_VALUE); assertThat(map.getDefaultValue(), equalTo("42")); }
@Test public void testKeysEmpty() throws Exception { BitSetObjectMap<String> map = new BitSetObjectMap<String>(DEFAULT_VALUE); assertThat(map.keys().length, equalTo(0)); }