### Question:
SubroutineAggregator { public List<Subroutine> aggregate(final Map<String, SubroutineDeclaration> declarations, final List<SubroutineDefinition> definitions, final Map<String, SubroutineDocumentation> subroutineDocumentation) { if (declarations == null) { throw new IllegalArgumentException("Declarations cannot be null."); } if (definitions == null) { throw new IllegalArgumentException("Definitions cannot be null."); } if (subroutineDocumentation == null) { throw new IllegalArgumentException("Subroutine documentation cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "aggregate(Map, List, Map)"); try { final List<Subroutine> subroutines = new ArrayList<Subroutine>(definitions.size()); for (final SubroutineDefinition definition : definitions) { final String subroutineName = definition.getName(); final SubroutineDocumentation documentation = subroutineDocumentation.get(subroutineName); final List<String> argumentNames = definition.getArgumentNames(); final List<SubroutineArgument> arguments = new ArrayList<SubroutineArgument>(argumentNames.size()); if (declarations.containsKey(subroutineName)) { final SubroutineDeclaration declaration = declarations.get(subroutineName); final List<SubroutineArgumentDeclaration> argumentDeclarations = declaration.getArguments(); for (int argumentPosition = 0; argumentPosition < argumentNames.size() && argumentPosition < argumentDeclarations.size(); argumentPosition++) { arguments.add(newArgument(argumentDeclarations.get(argumentPosition), documentation)); } subroutines .add(newSubroutine(subroutineName, arguments, declaration.getReturnType(), documentation)); } else { for (final String argumentName : argumentNames) { arguments.add(newArgument(argumentName, documentation)); } subroutines.add( newSubroutine(subroutineName, arguments, Subroutine.UNKNOWN_RETURN_TYPE, documentation)); } } return subroutines; } finally { point.collect(); } }  List<Subroutine> aggregate(final Map<String, SubroutineDeclaration> declarations,
            final List<SubroutineDefinition> definitions,
            final Map<String, SubroutineDocumentation> subroutineDocumentation);  }### Answer:
@Test public void testAggregateNullDeclarations() { IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> { aggregator.aggregate(null, Collections.<SubroutineDefinition> emptyList(), Collections.<String, SubroutineDocumentation> emptyMap()); }); assertThat(e.getMessage()).isEqualTo("Declarations cannot be null."); }
@Test public void testAggregateNullDefinitions() { IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> { aggregator.aggregate(Collections.<String, SubroutineDeclaration> emptyMap(), null, Collections.<String, SubroutineDocumentation> emptyMap()); }); assertThat(e.getMessage()).isEqualTo("Definitions cannot be null."); }
@Test public void testAggregateNullSubroutineDocumentation() { IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> { aggregator.aggregate(Collections.<String, SubroutineDeclaration> emptyMap(), Collections.<SubroutineDefinition> emptyList(), null); }); assertThat(e.getMessage()).isEqualTo("Subroutine documentation cannot be null."); }