@Test public void test_getDocumentById_docNotExists() { Mockito.when(em.find(Document.class, DOC_ID_NOT_EXIST)).thenReturn(null); IDocument doc = docDatabaseClientToTest.getDocumentById(DOC_ID_NOT_EXIST); Assert.assertNull(doc); }
@Override public IDocument getDocumentById(String id) { return em.find(Document.class, id); }
DocumentDatabaseClient extends DatabaseClient<IDocument> implements
        IDocumentDatabaseClient { @Override public IDocument getDocumentById(String id) { return em.find(Document.class, id); } }
DocumentDatabaseClient extends DatabaseClient<IDocument> implements
        IDocumentDatabaseClient { @Override public IDocument getDocumentById(String id) { return em.find(Document.class, id); }  }
DocumentDatabaseClient extends DatabaseClient<IDocument> implements
        IDocumentDatabaseClient { @Override public IDocument getDocumentById(String id) { return em.find(Document.class, id); }  @Override IDocument saveDocument(IDocument document); @Override IDocument getDocumentById(String id); @Override List<IDocument> getDocumentByUploadId(String uploadId); @Override List<IDocument> getDocumentsByUsername(String username); }
DocumentDatabaseClient extends DatabaseClient<IDocument> implements
        IDocumentDatabaseClient { @Override public IDocument getDocumentById(String id) { return em.find(Document.class, id); }  @Override IDocument saveDocument(IDocument document); @Override IDocument getDocumentById(String id); @Override List<IDocument> getDocumentByUploadId(String uploadId); @Override List<IDocument> getDocumentsByUsername(String username);  }