FullSegmentEncryptionKeyCache { @Nullable public byte[] remove(Uri uri) { return backingMap.remove(Assertions.checkNotNull(uri)); } FullSegmentEncryptionKeyCache(int maxSize); @Nullable byte[] get(@Nullable Uri uri); @Nullable byte[] put(Uri uri, byte[] encryptionKey); boolean containsUri(Uri uri); @Nullable byte[] remove(Uri uri);  }
@Test public void removeNullThrowsException() { FullSegmentEncryptionKeyCache cache = new FullSegmentEncryptionKeyCache( 5); try { cache.remove(null); fail(); } catch (NullPointerException expected) { } }