TagEditor { @NonNull public TagEditor removeTag(@NonNull String tag) { tagsToAdd.remove(tag); tagsToRemove.add(tag); return this; } @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) protected  TagEditor(); @NonNull TagEditor addTag(@NonNull String tag); @NonNull TagEditor addTags(@NonNull Set<String> tags); @NonNull TagEditor removeTag(@NonNull String tag); @NonNull TagEditor removeTags(@NonNull Set<String> tags); @NonNull TagEditor clear(); void apply();  }
@Test public void testRemoveTag() { editor.removeTag("some_tag") .apply(); assertEquals(1, tagsToRemove.size()); assertTrue(tagsToRemove.contains("some_tag")); assertEquals(0, tagsToAdd.size()); assertFalse(clear); }