@Test
  public void handlePacket() {
    OFPacketIn pkt =
        sw.factory()
            .buildPacketIn()
            .setBufferId(OFBufferId.NO_BUFFER)
            .setInPort(OFPort.NO_MASK)
            .setReason(OFPacketInReason.INVALID_TTL)
            .build();

    controller.processPacket(null, pkt);
    assertNotNull("message unprocessed", registry.ctx);
  }
 @Test
 public void testTest_returns_test() throws Exception {
   assertEquals("test", controller.test("key", resp));
 }
 @Before
 public void init() {
   userDaoMock = Mockito.mock(UserDAO.class);
   controller.setUserDAO(userDaoMock);
 }