source: class ChatRoomActionTest {
  
      @Inject
      private ChatRoomAction target;
      @Inject
      private Auth auth;
      @Inject
      private EntityManager em;
  
      @Test
      @InRequestScope // スコープをあわせる
      public void testChat() throws Exception{
  
target:         setUp();
          target.getChatRoom().setContent("chat");
          
          target.chat();
          
          assertThat(target.getChatRoom().getChats().size(), is(1));
          assertThat(target.getChatRoom().getChats().get(0).getContent(), is("chat"));
          assertThat(target.getChatRoom().getLastPost(), notNullValue());
        
      }
  
  }