TagEditor { @NonNull public TagEditor clear() { clear = true; 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 testClear() { editor.clear() .apply(); assertEquals(0, tagsToAdd.size()); assertEquals(0, tagsToRemove.size()); assertTrue(clear); }