### Question:
ArticleHandler extends Handler { @HandleErrors({ @HandleError(code = 20010, exception = ObjectNotFoundException.class, description = "article not found") }) @GET @Path("/{id}") @Doc("Get an article by id") public Article getArticle(@PathParam("id") @Required String articleId) { return em.find(Article.class, articleId); }  @PUT @Path("/") @Doc("Create an article") Article createArticle(
        @FormParam("title") @Required String title,
        @FormParam("content") @EscapeHTML @Required String content
    ); @HandleErrors({ @HandleError(code = 20010, exception = ObjectNotFoundException.class, description = "article not found") }) @GET @Path("/{id}") @Doc("Get an article by id") Article getArticle(@PathParam("id") @Required String articleId); @DBSession public EntityManager em; @LoginUser(required = true) public String userId; }### Answer:
@Test public void testGetArticle() throws Exception { UserHandlerTester.signup("article-user-2", "article-pass-2", null, User.class); UserHandler.TokenResult token = UserHandlerTester.login("article-user-2", "article-pass-2", UserHandler.TokenResult.class); Article article1 = ArticleHandlerTester.createArticle(token.token, "title2", "content2", Article.class); Article article2 = ArticleHandlerTester.getArticle(token.token, article1.id, Article.class); assertEquals(article1.id, article2.id); assertEquals(article1.title, article2.title); assertEquals(article1.content, article2.content); assertEquals(article1.author.id, article2.author.id); }