### Question:
DefaultProblemCollector implements ProblemCollector { @Override public void setSource( String source ) { this.source = source; } DefaultProblemCollector( List<Problem> problems ); @Override List<Problem> getProblems(); @Override void setSource( String source ); @Override void add( Problem.Severity severity, String message, int line, int column, Exception cause );  }### Answer:
@Test public void testSetSource() { DefaultProblemCollector collector = new DefaultProblemCollector( null ); collector.add( null, "PROBLEM1", -1, -1, null ); collector.setSource( "SOURCE_PROBLEM2" ); collector.add( null, "PROBLEM2", -1, -1, null ); collector.setSource( "SOURCE_PROBLEM3" ); collector.add( null, "PROBLEM3", -1, -1, null ); assertEquals( "", collector.getProblems().get( 0 ).getSource() ); assertEquals( "SOURCE_PROBLEM2", collector.getProblems().get( 1 ).getSource() ); assertEquals( "SOURCE_PROBLEM3", collector.getProblems().get( 2 ).getSource() ); }