### Question:
ExcludeFilter implements ArtifactsFilter { @Override public boolean isArtifactIncluded(final Artifact artifact) throws ArtifactFilterException { return !(artifact.getGroupId().equals(excludedGroupId) && artifact.getArtifactId().equals(excludedArtifactId)); } ExcludeFilter(final String excludedGroupId, final String excludedArtifactId); @Override Set<Artifact> filter(final Set<Artifact> artifacts); @Override boolean isArtifactIncluded(final Artifact artifact);  }### Answer:
@Test public void shouldExcludeByGroupAndArtifactId() throws ArtifactFilterException { assertThat(filter.isArtifactIncluded(excluded)).isFalse(); assertThat(filter.isArtifactIncluded(included1)).isTrue(); assertThat(filter.isArtifactIncluded(included2)).isTrue(); }