    @Test
    public void throwsExceptionWhenUpdatingConfigForDeProvisioning() {

        try {
            initiateMockStart();
            when(fieldAgentStatus.getControllerStatus()).thenReturn(Constants.ControllerStatus.OK);
            when(orchestrator.request(eq("deprovision"), any(), any(), any())).thenThrow(new SSLHandshakeException("Invalid operation"));
            String response = fieldAgent.deProvision(false);
            assertTrue(response.equals("\nSuccess - tokens, identifiers and keys removed"));
            PowerMockito.verifyPrivate(fieldAgent, atLeastOnce()).invoke("notProvisioned");
            Mockito.verify(orchestrator).request(eq("deprovision"), eq(RequestType.POST), eq(null), any());
            PowerMockito.verifyStatic(LoggingService.class, Mockito.atLeastOnce());
            LoggingService.logError(eq(MODULE_NAME),eq("Unable to make deprovision request due to broken certificate "), any());
        } catch (Exception e) {
            fail("This should never happen");
        }
    }