### Question:
Hello { @GET @Template("hello.html") public HelloResponse sayHello(@QueryParam("yourName") String yourName) { HelloResponse response = new HelloResponse(); Message message = messageDao.select(1L); response.setMessage(String.format(message.template, yourName)); return response; }  @GET @Template("hello.html") HelloResponse sayHello(@QueryParam("yourName") String yourName);  }### Answer:
@Test public void test_sayHello() throws Exception { Message message = new Message(); message.id = 1L; message.template = "Hello, %s!"; when(messageDao.select(1L)).thenReturn(message); HelloResponse said = hello.sayHello("world"); assertThat(said.getMessage(), is("Hello, world!")); verify(messageDao).select(1L); }