@Test
public void testAddNotifier() throws Exception {

    final Notifier notifier = new Notifier();
    notifier.setName("test");
    new Expectations() {
        {
            mockCatalogService.addNotifierInfo(notifier);times=1;
            result = notifier;
            mockFormDataBodyPart.getMediaType();
            result = APPLICATION_JSON_TYPE;
            mockFormDataBodyPart.getValueAs(Notifier.class);
            result = notifier;
            mockFileStorage.upload(mockInputStream, anyString);
            result = "uploadedPath";
        }
    };
    Notifier result = (Notifier) resource.addNotifier(
            mockInputStream,
            mockFormDataContentDisposition,
            mockFormDataBodyPart,
            securityContext).getEntity();
    assertEquals(notifier, result);
}