@Test
public void testFailAddingJmxCredentialsWithoutEncryptionConfigured() throws Exception {

  final MockObjects mocks = initMocks();
  ClusterResource clusterResource = new ClusterResource(mocks.context, new NoopCrypotograph(), EXECUTOR);
  Response response = clusterResource.addOrUpdateCluster(mocks.uriInfo,
                  Optional.of(SEED_HOST),
                  Optional.of(Cluster.DEFAULT_JMX_PORT),
                  Optional.of(JMX_USERNAME),
                  Optional.of(JMX_PASSWORD));
  assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatus());
}