@Test
public void testAddRemoveExcludedArtifacts() {
final ServiceConfig serviceConfig = new ServiceConfig(null, null, null);
serviceConfig.addExcludedArtifact(new MavenArtifact("org.drools:knowledge-api:jar:5.5.0-SNAPSHOT:compile"));
serviceConfig.addExcludedArtifact(new MavenArtifact("org.drools:knowledge-api:jar:5.5.0-SNAPSHOT:compile"));
serviceConfig.addExcludedArtifact(null);
assertEquals(1, serviceConfig.getExcludedArtifacts().size());
serviceConfig.removeExcludedArtifact(new MavenArtifact("org.drools:knowledge-api:jar:5.5.0-SNAPSHOT:compile"));
assertEquals(0, serviceConfig.getExcludedArtifacts().size());
serviceConfig.setExcludedArtifacts(excludedArtifacts);
serviceConfig.setExcludedArtifacts(null);
assertEquals(2, serviceConfig.getExcludedArtifacts().size());
serviceConfig.removeExcludedArtifact(new MavenArtifact("org.drools:knowledge-api:jar:5.5.0-SNAPSHOT:compile"));
serviceConfig.removeExcludedArtifact(new MavenArtifact("org.drools:knowledge-aaaapi:jar:5.5.0-SNAPSHOT:compile"));
serviceConfig.removeExcludedArtifact(null);
assertEquals(1, serviceConfig.getExcludedArtifacts().size());
serviceConfig.setExcludedArtifacts(new ArrayList<MavenArtifact>());
assertEquals(0, serviceConfig.getExcludedArtifacts().size());
serviceConfig.addExcludedArtifact(new MavenArtifact("org.drools:knowledge-aaaapi:jar:5.5.0-SNAPSHOT:compile"));
serviceConfig.addExcludedArtifacts(excludedArtifacts);
serviceConfig.addExcludedArtifacts(new ArrayList<MavenArtifact>());
serviceConfig.addExcludedArtifacts(null);
assertEquals(3, serviceConfig.getExcludedArtifacts().size());