import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
import org.springframework.http.client.reactive.JettyClientHttpConnector;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono;
@Test
public void testValidError()
{
- LOG.info("testValidError");
-
-
server
.enqueue(new MockResponse()
- .setStatus("400")
+ .setResponseCode(HttpStatus.BAD_REQUEST.value())
.setHeader("Content-Type", "application/json")
.setBody(
"{\n" +
assertEquals("(#613) Calls to stream have exceeded the rate of 600 calls per 600 seconds.", e.getMessage());
assertEquals(Type.OAuthException, e.getType());
})
- .verify(Duration.ofSeconds(3));
+ .verifyLater();
}
}