Ejemplo n.º 1
0
 @Test
 public void testDeleteTokeninfoServerTimeout() throws Exception {
   try {
     WireMock.addRequestProcessingDelay(2100);
     getRestTemplate()
         .exchange(
             delete(URI.create(getRawSyncBaseUri() + "/clients/animals/1"))
                 .header(AUTHORIZATION, SERVER_ERROR_ACCESS_TOKEN)
                 .build(),
             Void.class);
     failBecauseExceptionWasNotThrown(HttpServerErrorException.class);
   } catch (HttpServerErrorException e) {
     assertThat(e.getStatusCode()).isEqualTo(INTERNAL_SERVER_ERROR);
   }
 }