### Question:
IncludeFileFactory implements DocumentedObjectFactory<IncludeFile, IncludeDocumentation> { @Override public IncludeFile build(final String objectName, final IncludeDocumentation topLevelDocumentation, final List<Subroutine> subroutines, final List<RecordStructure> recordStructures) { return new IncludeFile(objectName, topLevelDocumentation == null ? new IncludeDocumentation() : topLevelDocumentation, subroutines, recordStructures); }  @Override IncludeFile build(final String objectName, final IncludeDocumentation topLevelDocumentation,
            final List<Subroutine> subroutines, final List<RecordStructure> recordStructures);  }### Answer:
@Test public void testBuild() throws Exception { final IncludeDocumentation doc = mock(IncludeDocumentation.class); final IncludeFile include = mock(IncludeFile.class); whenNew(IncludeFile.class).withArguments(objectName, doc, subroutines, recordStructures).thenReturn(include); assertThat(factory.build(objectName, doc, subroutines, recordStructures)).isEqualTo(include); }
@Test public void testBuildNullDocumentation() throws Exception { final IncludeDocumentation doc = mock(IncludeDocumentation.class); whenNew(IncludeDocumentation.class).withNoArguments().thenReturn(doc); final IncludeFile include = mock(IncludeFile.class); whenNew(IncludeFile.class).withArguments(objectName, doc, subroutines, recordStructures).thenReturn(include); assertThat(factory.build(objectName, null, subroutines, recordStructures)).isEqualTo(include); }