DefaultContentMetadata implements ContentMetadata { public DefaultContentMetadata copyWithMutationsApplied(ContentMetadataMutations mutations) { Map<String, byte[]> mutatedMetadata = applyMutations(metadata, mutations); if (isMetadataEqual(metadata, mutatedMetadata)) { return this; } return new DefaultContentMetadata(mutatedMetadata); } DefaultContentMetadata();  DefaultContentMetadata(Map<String, byte[]> metadata); DefaultContentMetadata copyWithMutationsApplied(ContentMetadataMutations mutations); Set<Entry<String, byte[]>> entrySet(); @Override @Nullable final byte[] get(String name, @Nullable byte[] defaultValue); @Override @Nullable final String get(String name, @Nullable String defaultValue); @Override final long get(String name, long defaultValue); @Override final boolean contains(String name); @Override boolean equals(@Nullable Object o); @Override int hashCode(); static final DefaultContentMetadata EMPTY; }
@Test public void testEmptyMutationDoesNotFail() throws Exception { ContentMetadataMutations mutations = new ContentMetadataMutations(); DefaultContentMetadata.EMPTY.copyWithMutationsApplied(mutations); }