@Override @Test public void retainAllFromEntrySet() { MutableSortedMap<Integer, String> map = this.newMapWithKeysValues(1, "1", 2, "Two"); Verify.assertThrows( UnsupportedOperationException.class, () -> map.entrySet().retainAll(FastList.newListWith(ImmutableEntry.of(2, "Two")))); }
@Test public void entrySetToArrayWithTarget() { MutableSortedMap<Integer, String> map = this.newMapWithKeyValue(1, "One").asUnmodifiable(); Object[] entries = map.entrySet().toArray(new Object[] {}); Assert.assertEquals(ImmutableEntry.of(1, "One"), entries[0]); }