[Resgiter Service] Need clarity on the purpose of an integration test
Can we please get clarity on the purpose of this integration test:
@Test
public void should_return20X_when_usingCredentialsWithPermissionOps() throws Exception {
this.should_return20X_when_usingCredentialsWithPermission(this.testUtils.getOpsAccessToken());
}
public void should_return20X_when_usingCredentialsWithPermission(String token) throws Exception {
this.createResource();
ClientResponse response = this.descriptor.run(this.getId(), token);
this.deleteResource();
Assert.assertEquals("[GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH]", response.getHeaders().getFirst("Access-Control-Allow-Methods"));
Assert.assertEquals("[origin, content-type, accept, authorization, data-partition-id, correlation-id, appkey]", response.getHeaders().getFirst("Access-Control-Allow-Headers"));
Assert.assertEquals("[*]", response.getHeaders().getFirst("Access-Control-Allow-Origin"));
Assert.assertEquals("[true]", response.getHeaders().getFirst("Access-Control-Allow-Credentials"));
Assert.assertEquals("DENY", response.getHeaders().getFirst("X-Frame-Options"));
Assert.assertEquals("1; mode=block", response.getHeaders().getFirst("X-XSS-Protection"));
Assert.assertEquals("nosniff", response.getHeaders().getFirst("X-Content-Type-Options"));
Assert.assertEquals("[no-cache, no-store, must-revalidate]", response.getHeaders().getFirst("Cache-Control"));
Assert.assertEquals("[default-src 'self']", response.getHeaders().getFirst("Content-Security-Policy"));
Assert.assertEquals("[max-age=31536000; includeSubDomains]", response.getHeaders().getFirst("Strict-Transport-Security"));
Assert.assertEquals("[0]", response.getHeaders().getFirst("Expires"));
Assert.assertEquals(this.error(response.getStatus() == 204 ? "" : (String)response.getEntity(String.class)), (long)this.expectedOkResponseCode(), (long)response.getStatus());
}