test_class.declarator: applicationContext
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private ApplicationContext applicationContext;
test_class.type: ApplicationContext
test_class.var_name: applicationContext
test_class.declarator: mockClient
test_class.modifier: private
test_class.original_string: private MockWebServiceClient mockClient;
test_class.type: MockWebServiceClient
test_class.var_name: mockClient
test_class.declarator: paullEndpoint
test_class.modifier: @SpyBean
      private
test_class.original_string: @SpyBean
      private PaullEndpoint paullEndpoint;
test_class.type: PaullEndpoint
test_class.var_name: paullEndpoint
test_class.declarator: pesAllerService
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private PesAllerService pesAllerService;
test_class.type: PesAllerService
test_class.var_name: pesAllerService
test_class.declarator: pesRetourService
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private PesRetourService pesRetourService;
test_class.type: PesRetourService
test_class.var_name: pesRetourService
test_class.declarator: localAuthorityService
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private LocalAuthorityService localAuthorityService;
test_class.type: LocalAuthorityService
test_class.var_name: localAuthorityService
test_class.declarator: externalRestService
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private ExternalRestService externalRestService;
test_class.type: ExternalRestService
test_class.var_name: externalRestService
test_class.declarator: sesileService
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private SesileService sesileService;
test_class.type: SesileService
test_class.var_name: sesileService
test_class.declarator: dateFormatterWithSeconds = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss")
test_class.modifier: private
test_class.original_string: private DateTimeFormatter dateFormatterWithSeconds = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss");
test_class.type: DateTimeFormatter
test_class.var_name: dateFormatterWithSeconds
test_class.declarator: dateFormatterWithMinutes = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm")
test_class.modifier: private
test_class.original_string: private DateTimeFormatter dateFormatterWithMinutes = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
test_class.type: DateTimeFormatter
test_class.var_name: dateFormatterWithMinutes
test_class.declarator: dateFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy")
test_class.modifier: private
test_class.original_string: private DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy");
test_class.type: DateTimeFormatter
test_class.var_name: dateFormatter
test_class.file: pes-service/src/test/java/fr/sictiam/stela/pesservice/soap/endpoints/PaullEndpointTest.java
test_class.identifier: PaullEndpointTest
test_case.body: @Test
      public void getDetailsPesAllerNoToken() {
          String detailsPesAllerRequest =
              "<getDetailsPESAllerRequest xmlns='http://www.processmaker.com'>" +
                  "<sessionId>sessionid</sessionId>" +
                  "<IdPesAller>aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee</IdPesAller>" +
              "</getDetailsPESAllerRequest>";
  
          String detailsPesAllerResponseNoToken =
              "<ns2:getDetailsPESAllerResponse xmlns:ns2='http://www.processmaker.com'>" +
                  "<ns2:statusCode>NOK</ns2:statusCode>" +
                  "<ns2:retour><ns2:message>SESSION_INVALID_OR_EXPIRED</ns2:message></ns2:retour>" +
              "</ns2:getDetailsPESAllerResponse>";
  
          given(paullEndpoint.getToken(any()))
                  .willReturn(null);
  
          mockClient.sendRequest(withPayload(new StringSource(detailsPesAllerRequest)))
              .andExpect(payload(new StringSource(detailsPesAllerResponseNoToken)));
      }
test_case.class_method_signature: PaullEndpointTest.getDetailsPesAllerNoToken()
test_case.full_signature: @Test public void getDetailsPesAllerNoToken()
test_case.identifier: getDetailsPesAllerNoToken
test_case.invocations: willReturn given getToken any andExpect sendRequest withPayload payload
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getDetailsPesAllerNoToken()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(PaullEndpoint.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(PaullEndpoint.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: NAMESPACE_URI = "http://www.processmaker.com"
focal_class.modifier: private static final
focal_class.original_string: private static final String NAMESPACE_URI = "http://www.processmaker.com";
focal_class.type: String
focal_class.var_name: NAMESPACE_URI
focal_class.declarator: dateFormatterWithMinutes = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm")
focal_class.modifier: private
focal_class.original_string: private DateTimeFormatter dateFormatterWithMinutes = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
focal_class.type: DateTimeFormatter
focal_class.var_name: dateFormatterWithMinutes
focal_class.declarator: dateFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy")
focal_class.modifier: private
focal_class.original_string: private DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy");
focal_class.type: DateTimeFormatter
focal_class.var_name: dateFormatter
focal_class.declarator: SECRET
focal_class.modifier: @Value("${application.jwt.secret}")
focal_class.original_string: @Value("${application.jwt.secret}")
      String SECRET;
focal_class.type: String
focal_class.var_name: SECRET
focal_class.declarator: pesAllerService
focal_class.modifier: private final
focal_class.original_string: private final PesAllerService pesAllerService;
focal_class.type: PesAllerService
focal_class.var_name: pesAllerService
focal_class.declarator: pesRetourService
focal_class.modifier: private final
focal_class.original_string: private final PesRetourService pesRetourService;
focal_class.type: PesRetourService
focal_class.var_name: pesRetourService
focal_class.declarator: localAuthorityService
focal_class.modifier: private final
focal_class.original_string: private final LocalAuthorityService localAuthorityService;
focal_class.type: LocalAuthorityService
focal_class.var_name: localAuthorityService
focal_class.declarator: externalRestService
focal_class.modifier: private final
focal_class.original_string: private final ExternalRestService externalRestService;
focal_class.type: ExternalRestService
focal_class.var_name: externalRestService
focal_class.declarator: sesileService
focal_class.modifier: private final
focal_class.original_string: private final SesileService sesileService;
focal_class.type: SesileService
focal_class.var_name: sesileService
focal_class.file: pes-service/src/main/java/fr/sictiam/stela/pesservice/soap/endpoints/PaullEndpoint.java
focal_class.identifier: PaullEndpoint
focal_class.class_method_signature: PaullEndpoint.PaullEndpoint(PesAllerService pesAllerService, LocalAuthorityService localAuthorityService,
              ExternalRestService externalRestService, PesRetourService pesRetourService, SesileService sesileService)
focal_class.full_signature: public  PaullEndpoint(PesAllerService pesAllerService, LocalAuthorityService localAuthorityService,
              ExternalRestService externalRestService, PesRetourService pesRetourService, SesileService sesileService)
focal_class.identifier: PaullEndpoint
focal_class.modifiers: public
focal_class.parameters: (PesAllerService pesAllerService, LocalAuthorityService localAuthorityService,
              ExternalRestService externalRestService, PesRetourService pesRetourService, SesileService sesileService)
focal_class.signature:  PaullEndpoint(PesAllerService pesAllerService, LocalAuthorityService localAuthorityService,
              ExternalRestService externalRestService, PesRetourService pesRetourService, SesileService sesileService)
focal_class.class_method_signature: PaullEndpoint.getToken(String sessionID)
focal_class.full_signature:  PaullSoapToken getToken(String sessionID)
focal_class.identifier: getToken
focal_class.parameters: (String sessionID)
focal_class.return: PaullSoapToken
focal_class.signature: PaullSoapToken getToken(String sessionID)
focal_class.class_method_signature: PaullEndpoint.depotPESAller(@RequestPayload DepotPESAllerRequest depotPesAller)
focal_class.full_signature: @PayloadRoot(namespace = NAMESPACE_URI, localPart = "depotPESAllerRequest") public @ResponsePayload DepotPESAllerResponse depotPESAller(@RequestPayload DepotPESAllerRequest depotPesAller)
focal_class.identifier: depotPESAller
focal_class.modifiers: @PayloadRoot(namespace = NAMESPACE_URI, localPart = "depotPESAllerRequest") public @ResponsePayload
focal_class.parameters: (@RequestPayload DepotPESAllerRequest depotPesAller)
focal_class.return: DepotPESAllerResponse
focal_class.signature: DepotPESAllerResponse depotPESAller(@RequestPayload DepotPESAllerRequest depotPesAller)
focal_class.class_method_signature: PaullEndpoint.getDetailsPESAller(
              @RequestPayload GetDetailsPESAllerRequest getDetailsPESAllerRequest)
focal_class.full_signature: @PayloadRoot(namespace = NAMESPACE_URI, localPart = "getDetailsPESAllerRequest") public @ResponsePayload GetDetailsPESAllerResponse getDetailsPESAller(
              @RequestPayload GetDetailsPESAllerRequest getDetailsPESAllerRequest)
focal_class.identifier: getDetailsPESAller
focal_class.modifiers: @PayloadRoot(namespace = NAMESPACE_URI, localPart = "getDetailsPESAllerRequest") public @ResponsePayload
focal_class.parameters: (
              @RequestPayload GetDetailsPESAllerRequest getDetailsPESAllerRequest)
focal_class.return: GetDetailsPESAllerResponse
focal_class.signature: GetDetailsPESAllerResponse getDetailsPESAller(
              @RequestPayload GetDetailsPESAllerRequest getDetailsPESAllerRequest)
focal_class.class_method_signature: PaullEndpoint.getDetailsPESAllerResponseError(String errorMessage)
focal_class.full_signature: private GetDetailsPESAllerResponse getDetailsPESAllerResponseError(String errorMessage)
focal_class.identifier: getDetailsPESAllerResponseError
focal_class.modifiers: private
focal_class.parameters: (String errorMessage)
focal_class.return: GetDetailsPESAllerResponse
focal_class.signature: GetDetailsPESAllerResponse getDetailsPESAllerResponseError(String errorMessage)
focal_class.class_method_signature: PaullEndpoint.getPESAller(@RequestPayload GetPESAllerRequest getPESAllerRequest)
focal_class.full_signature: @PayloadRoot(namespace = NAMESPACE_URI, localPart = "getPESAllerRequest") public @ResponsePayload GetPESAllerResponse getPESAller(@RequestPayload GetPESAllerRequest getPESAllerRequest)
focal_class.identifier: getPESAller
focal_class.modifiers: @PayloadRoot(namespace = NAMESPACE_URI, localPart = "getPESAllerRequest") public @ResponsePayload
focal_class.parameters: (@RequestPayload GetPESAllerRequest getPESAllerRequest)
focal_class.return: GetPESAllerResponse
focal_class.signature: GetPESAllerResponse getPESAller(@RequestPayload GetPESAllerRequest getPESAllerRequest)
focal_class.class_method_signature: PaullEndpoint.getPESRetour(@RequestPayload GetPESRetourRequest getPESRetourRequest)
focal_class.full_signature: @PayloadRoot(namespace = NAMESPACE_URI, localPart = "getPESRetourRequest") public @ResponsePayload GetPESRetourResponse getPESRetour(@RequestPayload GetPESRetourRequest getPESRetourRequest)
focal_class.identifier: getPESRetour
focal_class.modifiers: @PayloadRoot(namespace = NAMESPACE_URI, localPart = "getPESRetourRequest") public @ResponsePayload
focal_class.parameters: (@RequestPayload GetPESRetourRequest getPESRetourRequest)
focal_class.return: GetPESRetourResponse
focal_class.signature: GetPESRetourResponse getPESRetour(@RequestPayload GetPESRetourRequest getPESRetourRequest)
focal_method.body: PaullSoapToken getToken(String sessionID) {
  
          if (sessionID != null) {
  
              try {
                  String token = externalRestService.getPaullConnection(sessionID).get("token").asText();
                  Claims tokenClaim = Jwts.parser().setSigningKey(SECRET).parseClaimsJws(token).getBody();
                  if (tokenClaim.getExpiration().before(new Date())) {
                      return null;
                  }
                  String tokenParsed = tokenClaim.getSubject();
  
                  ObjectMapper objectMapper = new ObjectMapper();
                  return objectMapper.readValue(tokenParsed, PaullSoapToken.class);
              } catch (IOException e) {
                  LOGGER.error(e.getMessage());
                  return null;
              }
  
          }
          return null;
      }
focal_method.class_method_signature: PaullEndpoint.getToken(String sessionID)
focal_method.full_signature:  PaullSoapToken getToken(String sessionID)
focal_method.identifier: getToken
focal_method.invocations: asText get getPaullConnection getBody parseClaimsJws setSigningKey parser before getExpiration getSubject readValue error getMessage
focal_method.parameters: (String sessionID)
focal_method.return: PaullSoapToken
focal_method.signature: PaullSoapToken getToken(String sessionID)