<groupId>org.opendaylight.infrautils</groupId>
<artifactId>inject.guice</artifactId>
</dependency>
- <dependency>
- <groupId>com.google.truth</groupId>
- <artifactId>truth</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.infrautils</groupId>
<artifactId>inject.guice.testutils</artifactId>
*/
package org.opendaylight.aaa.web.testutils.test;
-import static com.google.common.truth.Truth.assertThat;
+import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.net.URISyntaxException;
webContextBuilder.addServlet(
ServletDetails.builder().addUrlPattern("/hello").name("Test").servlet(new TestServlet()).build());
try (WebContextRegistration webContextRegistration = webServer.registerWebContext(webContextBuilder.build())) {
- assertThat(webClient.request("GET", "test1/hello").body()).isEqualTo("hello, world");
- assertThat(webClient.request("GET", "/test1/hello").body()).isEqualTo("hello, world");
+ assertEquals("hello, world", webClient.request("GET", "test1/hello").body());
+ assertEquals("hello, world", webClient.request("GET", "/test1/hello").body());
}
}
- @SuppressWarnings("serial")
- class TestServlet extends HttpServlet {
+ static class TestServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
@Override
protected void doGet(final HttpServletRequest req, final HttpServletResponse response) throws IOException {
response.getOutputStream().print("hello, world");