### Question:
EntityReferenceSet { public EntityReferenceSet excludes(EntityReference reference) { if (this.excludes == null) { this.excludes = new EntityReferenceEntry(); } add(reference, this.excludes); return this; }  EntityReferenceSet includes(EntityReference reference); EntityReferenceSet excludes(EntityReference reference); boolean matches(EntityReference reference);  }### Answer:
@Test public void excludeWiki() throws Exception { excludesWiki("wiki"); assertNotMatchesWiki("wiki"); assertMatchesWiki("otherwiki"); assertMatchesWiki("notwiki"); set.excludes(new EntityReference("otherwiki", EntityType.WIKI)); assertNotMatchesWiki("wiki"); assertNotMatchesWiki("otherwiki"); assertMatchesWiki("notwiki"); }
@Test public void excludeLocale() { excludes(new DocumentReference("wiki", "space", "document", Locale.ENGLISH)); assertMatches(new DocumentReference("wiki", "space", "document")); assertNotMatches(new DocumentReference("wiki", "space", "document", Locale.ENGLISH)); assertMatches(new DocumentReference("wiki", "space", "document", Locale.FRENCH)); assertMatches(new DocumentReference("wiki", "space", "document", Locale.ROOT)); excludes(new DocumentReference("wiki", "space", "document", Locale.FRENCH)); assertMatches(new DocumentReference("wiki", "space", "document")); assertNotMatches(new DocumentReference("wiki", "space", "document", Locale.ENGLISH)); assertNotMatches(new DocumentReference("wiki", "space", "document", Locale.FRENCH)); assertMatches(new DocumentReference("wiki", "space", "document", Locale.ROOT)); }