@Test
public void resourceIdMissingFormDataNoDefaultTest() throws Exception {

    exceptionRule.expect(MobiWebException.class);
    exceptionRule.expectMessage("Expected Request to have form data");
    FormDataMultiPart formPart = new FormDataMultiPart();
    when(context.readEntity(FormDataMultiPart.class)).thenReturn(formPart);
    when(context.hasEntity()).thenReturn(false);
    when(context.getMediaType()).thenReturn(MediaType.MULTIPART_FORM_DATA_TYPE);
    when(uriInfo.getPathParameters()).thenReturn(new MultivaluedHashMap<>());
    when(uriInfo.getQueryParameters()).thenReturn(new MultivaluedHashMap<>());
    when(resourceInfo.getResourceMethod()).thenReturn(MockResourceIdFormDataClass.class.getDeclaredMethod("formDataNoDefault"));
    filter.filter(context);
}