### Question:
DesignHtmlLibraryManagerImpl implements DesignHtmlLibraryManager { @Override public String[] getLibraries(final Design design, final PageRegion pageRegion) { final String[] cssLibs = this.getCssLibraries(design, pageRegion); final String[] jsLibs = this.getJsLibraries(design, pageRegion); final LinkedHashSet<String> libs = new LinkedHashSet<String>(); libs.addAll(Arrays.asList(cssLibs)); libs.addAll(Arrays.asList(jsLibs)); return libs.toArray(new String[libs.size()]); }  @Override void writeCssInclude(final SlingHttpServletRequest request, final Design design,
            final PageRegion pageRegion, final Writer writer); @Override void writeJsInclude(final SlingHttpServletRequest request, final Design design,
            final PageRegion pageRegion, final Writer writer); @Override void writeIncludes(final SlingHttpServletRequest request, final Design design,
            final PageRegion pageRegion, final Writer writer); @Override String[] getCssLibraries(final Design design, final PageRegion pageRegion); @Override String[] getJsLibraries(final Design design, final PageRegion pageRegion); @Override String[] getLibraries(final Design design, final PageRegion pageRegion);  }### Answer:
@Test public void testGetLibrariesDoesDeDuplication() throws IOException { when(design.getContentResource()).thenReturn(designContentResource); setLibraries(designContentResource, PageRegion.HEAD, new String[] { "css1", "cssandjs1" }, new String[] { "js1", "cssandjs1" }); String[] categories = instance.getLibraries(design, PageRegion.HEAD); assertArrayEquals(new Object[] { "css1", "cssandjs1", "js1" }, categories); }