@RequestHeader Map<String, String> headers) throws EntityNotFoundException {
Policy policy = policies.getPolicy(id);
return authorization.doAccessControl(headers, policy, AccessType.READ) //
- .map(x -> new ResponseEntity<>((Object) gson.toJson(toPolicyInfo(policy)), HttpStatus.OK)) //
+ .map(x -> new ResponseEntity<Object>(gson.toJson(toPolicyInfo(policy)), HttpStatus.OK)) //
.onErrorResume(this::handleException);
}
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.TestPropertySource;
import org.springframework.util.FileSystemUtils;
-import org.springframework.web.reactive.function.client.WebClientRequestException;
import org.springframework.web.reactive.function.client.WebClientResponseException;
import reactor.core.publisher.Mono;
@Test
@DisplayName("test ZZ Actuator")
- void testZZActuator() throws Exception {
+ void testZZActuator() {
// The test must be run last, hence the "ZZ" in the name. All succeeding tests
// will fail.
AsyncRestClient client = restClient(baseUrl(), false);