### Question:
JavaInterfaceBuilderImpl extends BaseBuilder implements JavaInterfaceBuilder { @Override public void addImport(String packageName, String object) { Name name = new Name(); name.setQualifier(new Name(packageName)); name.setIdentifier(object); if (!getPackageName().equalsIgnoreCase(packageName) && !CompilationUnitUtils.isImported(getCompilationUnit(), name)) { getCompilationUnit().addImport(new ImportDeclaration(name, false, false)); } } JavaInterfaceBuilderImpl(String packageName, String name, String annotationsPackage); static void main(String[] args); @Override void setJavaDoc(String comment); @Override void addAnnotation(String annotationName); @Override void addMethodAnnotation(String methodName, String annotationName); @Override void addParametrizedMethodAnnotation(
      String methodName, String annotationName, String parameter); @Override String getName(); @Override void addImport(String packageName, String object); @Override void addMethod(
      String name, String description, List<MethodParam> methodParams, String returnType);  }### Answer:
@Test public void testAddingImportsOnSamePackage() throws IOException { Capture<CompilationUnit> compilationUnitCapture = Capture.newInstance(); sourceProject.addCompilationUnit( eq(BASE_PACKAGE_NAME), eq(NAME), capture(compilationUnitCapture)); replayAll(); interfaceBuilder.addImport(BASE_PACKAGE_NAME, "Test"); interfaceBuilder.addImport("java.util", "List"); interfaceBuilder.addImport("java.util", "List"); interfaceBuilder.addImport("java.util", "List"); interfaceBuilder.build(sourceProject); assertEquals( "package com.github.kklisura;\n\n" + "import java.util.List;\n" + "\n" + "public interface InterfaceTest {\n" + "}\n" + "", compilationUnitCapture.getValue().toString()); verifyAll(); }