### Question:
SoapTagService extends AbstractService implements TagService { @Override public String[] getDocumentTags(String sid, long docId) throws Exception { SoapDocumentService docService = getDocumentService(); WSDocument doc = docService.getDocument(sid, docId); if (doc == null) return new String[0]; User user = validateSession(sid); checkReadEnable(user, doc.getFolderId()); return doc.getTags() != null ? doc.getTags() : new String[0]; }  @Override void setDocumentTags(String sid, long docId, String[] tags); @Override void addDocumentTags(String sid, long docId, String[] tags); @Override String[] getDocumentTags(String sid, long docId); @Override void setFolderTags(String sid, long folderId, String[] tags); @Override void addFolderTags(String sid, long folderId, String[] tags); @Override String[] getFolderTags(String sid, long folderId); @Override String[] getTags(String sid); @Override String[] getTagsPreset(String sid); @Override WSTagCloud[] getTagCloud(String sid); @Override WSDocument[] findDocumentsByTag(String sid, String tag); @Override WSFolder[] findFoldersByTag(String sid, String tag);  }### Answer:
@Test public void testGetDocumentTags() throws Exception { WSDocument[] documents = tagService.findDocumentsByTag("", "abc"); Assert.assertNotNull(documents); Assert.assertEquals(1, documents.length); tagService.addDocumentTags("", documents[0].getId(), new String[] { "pippo", "pluto" }); List<String> tags = Arrays.asList(tagService.getDocumentTags("", documents[0].getId())); Assert.assertTrue(tags.contains("abc")); Assert.assertTrue(tags.contains("pippo")); Assert.assertTrue(tags.contains("pluto")); }