### Question:
BufferConfigSource extends AbstractConfigSource { @Override protected void visit(final ConfigLocationVisitor visitor) throws IOException { if (location instanceof VisitableLocation) { ((VisitableLocation) location).accept(visitor); } } BufferConfigSource(final String content);  BufferConfigSource(final String content, final Location location); @Override Reader getReader(); @Override Location getLocation();  }### Answer:
@Test public void testVisitWithUnvisitableLocation() throws IOException { EasyMockUnitils.replay(); source.visit(mockVisitor); }
@Test public void testVisitWithVisitableLocation() throws IOException { mockVisitableLocation.accept(mockVisitor); expectLastCall(); EasyMockUnitils.replay(); new BufferConfigSource(CONTENT, mockVisitableLocation).visit(mockVisitor); }