@Test
public void testGetResourcesErrorResponse() {

    final String errorMsg = "unknown error";
    registryClient = new MockNiFiRegistryClient(errorMsg, Response.Status.BAD_REQUEST.getStatusCode());
    ResourceLookupContext resourceLookupContext = Mockito.mock(ResourceLookupContext.class);
    when(resourceLookupContext.getUserInput()).thenReturn("");
    try {
        registryClient.getResources(resourceLookupContext);
        Assert.fail("should have thrown exception");
    } catch (Exception e) {
        Assert.assertTrue(e.getMessage().contains(errorMsg));
    }
}