@Test public void getCommentTest() { mCommentService = CommentService.getInstance(); Comment comment = new Comment(); comment.setId(999999); comment.setText("text"); comment.setBy("by"); comment.setTime(120000); long result = mCommentService.createComment(RuntimeEnvironment.application, comment); Assert.assertTrue(result > 0); // check item Comment dbComment = mCommentService.getComment(RuntimeEnvironment.application, 999999); Assert.assertTrue(dbComment != null && dbComment.getId() == 999999); // remove item mCommentService.removeComment(RuntimeEnvironment.application, 999999); // Close connection SQLiteDataBaseHelper.getInstance(RuntimeEnvironment.application).getWritableDatabase().close(); }