@Test
public void testListNotifications() throws Exception {

    final MultivaluedMap<String, String> qp = new MultivaluedHashMap<String, String>() {
        {
            putSingle("status", "DELIVERED");
            putSingle("notifierName", "console_notifier");
            putSingle("startTs", "1444625166800");
            putSingle("endTs", "1444625166810");
        }
    };
    new Expectations() {
        {
            mockUriInfo.getQueryParameters(); times = 1;
            result = qp;
        }
    };
    try {
        resource.listNotifications(mockUriInfo, securityContext);
        fail("We don't mock the result so it should throw entity not found");
    } catch (EntityNotFoundException e) {
        // expected
        new Verifications() {
            {
                List<QueryParam> qps;
                mockNotificationService.findNotifications(qps = withCapture());
                //System.out.println(qps);
                assertEquals(4, qps.size());
            }
        };
    }
}