@Test
public void getDetailsPesAllerNoLocalAuthority() {

    String detailsPesAllerRequest =
        "<getDetailsPESAllerRequest xmlns='http://www.processmaker.com'>" +
            "<sessionId>sessionid</sessionId>" +
            "<IdPesAller>aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee</IdPesAller>" +
        "</getDetailsPESAllerRequest>";
    String detailsPesAllerResponseNoLocalAuthority =
        "<ns2:getDetailsPESAllerResponse xmlns:ns2='http://www.processmaker.com'>" +
            "<ns2:statusCode>NOK</ns2:statusCode>" +
            "<ns2:retour><ns2:message>LOCALAUTHORITY_NOT_GRANTED</ns2:message></ns2:retour>" +
        "</ns2:getDetailsPESAllerResponse>";
    given(paullEndpoint.getToken(any()))
            .willReturn(new PaullSoapToken());
    given(localAuthorityService.localAuthorityGranted(any(), any()))
            .willReturn(false);
    mockClient.sendRequest(withPayload(new StringSource(detailsPesAllerRequest)))
            .andExpect(payload(new StringSource(detailsPesAllerResponseNoLocalAuthority)));
}