@Test
public void testConnectionTestFailure() {

    final String errorMsg = "unknown error";
    registryClient = new MockNiFiRegistryClient(errorMsg, Response.Status.BAD_REQUEST.getStatusCode());
    HashMap<String, Object> ret = registryClient.connectionTest();
    Assert.assertNotNull(ret);
    Assert.assertEquals(NiFiRegistryClient.FAILURE_MSG, ret.get("message"));
}