### Question:
Imports { @JsOverlay public static final Imports create(List<DefaultImport> defaultImports, List<WSDLImport> wsdlImports) { final String hidden = "hidden"; final String visible = ""; final Imports instance = new Imports(); instance.totalDefaultImports = defaultImports.size(); instance.totalWSDLImports = wsdlImports.size(); instance.defaultImports = defaultImports.toArray(new DefaultImport[defaultImports.size()]); instance.wsdlImports = wsdlImports.toArray(new WSDLImport[wsdlImports.size()]); instance.defaultImportsHidden = hidden; instance.wsdlImportsHidden = hidden; instance.noImportsHidden = visible; instance.importsTableHidden = hidden; if (!defaultImports.isEmpty()) { instance.defaultImportsHidden = visible; instance.importsTableHidden = visible; instance.noImportsHidden = hidden; } if (!wsdlImports.isEmpty()) { instance.wsdlImportsHidden = visible; instance.importsTableHidden = visible; instance.noImportsHidden = hidden; } return instance; } private  Imports(); @JsOverlay static final Imports create(List<DefaultImport> defaultImports,
                                       List<WSDLImport> wsdlImports); @JsOverlay final String getDefaultImportsHidden(); @JsOverlay final String getWSDLImportsHidden(); @JsOverlay final String getImportsTableHidden(); @JsOverlay final String getNoImportsHidden(); @JsOverlay final Integer getTotalDefaultImports(); @JsOverlay final Integer getTotalWSDLImports(); @JsOverlay final DefaultImport[] getDefaultImports(); @JsOverlay final WSDLImport[] getWSDLImports();  }### Answer:
@Test public void createImportsSuccess() { final ArrayList<Imports.DefaultImport> defaultImports = new ArrayList<>(); final ArrayList<Imports.WSDLImport> wsdlImports = new ArrayList<>(); final Object imports = Imports.create(defaultImports, wsdlImports); assertNotNull(imports); assertTrue(imports instanceof Imports); }
@Test(expected = NullPointerException.class) public void createImportsFail() { final Imports imports = Imports.create(null, null); }
@Test public void createDefaultImport() { final Imports.DefaultImport defaultImports = Imports.DefaultImport.create(CLASS_NAME); assertNotNull(defaultImports); assertEquals(CLASS_NAME, defaultImports.getClassName()); assertTrue(defaultImports instanceof Imports.DefaultImport); }
@Test public void createWSDLImport() { final Imports.WSDLImport wsdlImport = Imports.WSDLImport.create(LOCATION, NAMESPACE); assertNotNull(wsdlImport); assertEquals(LOCATION, wsdlImport.getLocation()); assertEquals(NAMESPACE, wsdlImport.getNamespace()); assertTrue(wsdlImport instanceof Imports.WSDLImport); }