@Test public void testBuildNullDocumentation() throws Exception { final ScriptDocumentation doc = mock(ScriptDocumentation.class); whenNew(ScriptDocumentation.class).withNoArguments().thenReturn(doc); final CclScript script = mock(CclScript.class); whenNew(CclScript.class).withArguments(objectName, doc, subroutines, recordStructures).thenReturn(script); assertThat(factory.build(objectName, null, subroutines, recordStructures)).isEqualTo(script); }
@Override public CclScript build(final String objectName, final ScriptDocumentation topLevelDocumentation, final List<Subroutine> subroutines, final List<RecordStructure> recordStructures) { return new CclScript(objectName, topLevelDocumentation == null ? new ScriptDocumentation() : topLevelDocumentation, subroutines, recordStructures); }
CclScriptFactory implements DocumentedObjectFactory<CclScript, ScriptDocumentation> { @Override public CclScript build(final String objectName, final ScriptDocumentation topLevelDocumentation, final List<Subroutine> subroutines, final List<RecordStructure> recordStructures) { return new CclScript(objectName, topLevelDocumentation == null ? new ScriptDocumentation() : topLevelDocumentation, subroutines, recordStructures); } }
CclScriptFactory implements DocumentedObjectFactory<CclScript, ScriptDocumentation> { @Override public CclScript build(final String objectName, final ScriptDocumentation topLevelDocumentation, final List<Subroutine> subroutines, final List<RecordStructure> recordStructures) { return new CclScript(objectName, topLevelDocumentation == null ? new ScriptDocumentation() : topLevelDocumentation, subroutines, recordStructures); }  }
CclScriptFactory implements DocumentedObjectFactory<CclScript, ScriptDocumentation> { @Override public CclScript build(final String objectName, final ScriptDocumentation topLevelDocumentation, final List<Subroutine> subroutines, final List<RecordStructure> recordStructures) { return new CclScript(objectName, topLevelDocumentation == null ? new ScriptDocumentation() : topLevelDocumentation, subroutines, recordStructures); }  @Override CclScript build(final String objectName, final ScriptDocumentation topLevelDocumentation,
            final List<Subroutine> subroutines, final List<RecordStructure> recordStructures); }
CclScriptFactory implements DocumentedObjectFactory<CclScript, ScriptDocumentation> { @Override public CclScript build(final String objectName, final ScriptDocumentation topLevelDocumentation, final List<Subroutine> subroutines, final List<RecordStructure> recordStructures) { return new CclScript(objectName, topLevelDocumentation == null ? new ScriptDocumentation() : topLevelDocumentation, subroutines, recordStructures); }  @Override CclScript build(final String objectName, final ScriptDocumentation topLevelDocumentation,
            final List<Subroutine> subroutines, final List<RecordStructure> recordStructures);  }