### Question:
AggregateBuilder { public String add(AnalysisEngineDescription aed, String... viewNames) { String componentName = aed.getAnalysisEngineMetaData().getName(); if (componentName == null || componentName.equals("")) { if (aed.isPrimitive()) { componentName = aed.getAnnotatorImplementationName(); } else { componentName = "aggregate"; } } if (componentNames.contains(componentName)) { componentName = componentName + "." + (componentNames.size() + 1); } add(componentName, aed, viewNames); return componentName; } AggregateBuilder();  AggregateBuilder(TypeSystemDescription typeSystemDescription,
          TypePriorities typePriorities, FlowControllerDescription flowControllerDescription); String add(AnalysisEngineDescription aed, String... viewNames); void add(String componentName, AnalysisEngineDescription aed, String... viewNames); void addSofaMapping(String componentName, String componentViewName,
          String aggregateViewName); void setFlowControllerDescription(FlowControllerDescription flowControllerDescription); AnalysisEngine createAggregate(); AnalysisEngineDescription createAggregateDescription();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testOddNumberOfViewNames() throws ResourceInitializationException { AggregateBuilder builder = new AggregateBuilder(); builder.add(AnalysisEngineFactory.createEngineDescription(Annotator1.class, typeSystemDescription), ViewNames.PARENTHESES_VIEW); }
@Test(expected = IllegalArgumentException.class) public void testDuplicateComponentNames() throws ResourceInitializationException { AggregateBuilder builder = new AggregateBuilder(); builder.add("name", AnalysisEngineFactory.createEngineDescription(Annotator1.class, typeSystemDescription)); builder.add("name", AnalysisEngineFactory.createEngineDescription(Annotator1.class, typeSystemDescription)); }