Exemplo n.º 1
0
 private boolean clientExists(RestOperations client, OAuth2ProtectedResourceDetails resource) {
   ResponseEntity<String> response =
       client.getForEntity(
           serverRunning.getClientsUri() + "/" + resource.getClientId(), String.class);
   return response != null && response.getStatusCode() == HttpStatus.OK;
 }
Exemplo n.º 2
0
 private void createClient(RestOperations client, ClientDetails clientDetails) {
   ResponseEntity<String> response =
       client.postForEntity(serverRunning.getClientsUri(), clientDetails, String.class);
   assertEquals(HttpStatus.CREATED, response.getStatusCode());
 }