### Question:
ResultPrinter extends ResultReceiver { @Override public void close() throws IOException { for (PrintStream stream : openStreams.values()) { stream.close(); } } ResultPrinter(String algorithmExecutionIdentifier, List<ColumnIdentifier> acceptedColumns); protected  ResultPrinter(String algorithmExecutionIdentifier, List<ColumnIdentifier> acceptedColumns, Boolean test); @Override void receiveResult(BasicStatistic statistic); @Override void receiveResult(FunctionalDependency functionalDependency); @Override void receiveResult(ConditionalInclusionDependency conditionalDependency); @Override void receiveResult(MatchingDependency matchingDependency); @Override void receiveResult(ConditionalFunctionalDependency conditionalFunctionalDependency); @Override void receiveResult(MultivaluedDependency multivaluedDependency); @Override void receiveResult(InclusionDependency inclusionDependency); @Override void receiveResult(UniqueColumnCombination uniqueColumnCombination); @Override void receiveResult(ConditionalUniqueColumnCombination conditionalUniqueColumnCombination); @Override void receiveResult(OrderDependency orderDependency); @Override void receiveResult(DenialConstraint dc); @Override void close(); List<Result> getResults();  }### Answer:
@Test public void testClose() throws IOException { printer.close(); }
@Test public void testCloseSetStatStream() throws IOException { PrintStream statStream = mock(PrintStream.class); printer.openStreams.put(ResultType.BASIC_STAT, statStream); printer.close(); verify(statStream).close(); }
@Test public void testCloseSetFdStream() throws IOException { PrintStream fdStream = mock(PrintStream.class); printer.openStreams.put(ResultType.FD, fdStream); printer.close(); verify(fdStream).close(); }
@Test public void testCloseSetIndStream() throws IOException { PrintStream indStream = mock(PrintStream.class); printer.openStreams.put(ResultType.IND, indStream); printer.close(); verify(indStream).close(); }
@Test public void testCloseSetUccStream() throws IOException { PrintStream uccStream = mock(PrintStream.class); printer.openStreams.put(ResultType.UCC, uccStream); printer.close(); verify(uccStream).close(); }
@Test public void testCloseSetDcStream() throws IOException { PrintStream dcStream = mock(PrintStream.class); printer.openStreams.put(ResultType.DC, dcStream); printer.close(); verify(dcStream).close(); }