@Test
public void testGetStatusWithSignerFailure() {

    ChangeLogStore structStore = new ZMSFileChangeLogStore("/tmp/zts_server_unit_tests/zts_root",
            privateKey, "0");
    DataStore store = new DataStore(structStore, null);
    ZTSImpl ztsImpl = new ZTSImpl(mockCloudStore, store);
    ztsImpl.statusPort = 0;
    ztsImpl.statusCertSigner = true;
    InstanceCertManager certManager = Mockito.mock(InstanceCertManager.class);
    Mockito.when(certManager.getCACertificate()).thenReturn(null);
    ztsImpl.instanceCertManager = certManager;
    Principal principal = SimplePrincipal.create("user_domain", "user1",
            "v=U1;d=user_domain;n=user;s=signature", 0, null);
    ResourceContext context = createResourceContext(principal);
    try {
        ztsImpl.getStatus(context);
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 404);
    }
}