|
22 | 22 | import org.apache.hadoop.yarn.appcatalog.model.AppEntry;
|
23 | 23 | import org.apache.hadoop.yarn.service.api.records.Component;
|
24 | 24 | import org.apache.hadoop.yarn.service.api.records.Container;
|
| 25 | + |
25 | 26 | import org.junit.jupiter.api.BeforeEach;
|
26 | 27 | import org.junit.jupiter.api.Test;
|
27 | 28 | import org.mockito.Mockito;
|
28 | 29 |
|
29 | 30 | import javax.ws.rs.Path;
|
30 | 31 | import javax.ws.rs.core.Response;
|
31 | 32 |
|
32 |
| -import static org.hamcrest.MatcherAssert.assertThat; |
33 |
| -import static org.hamcrest.core.Is.is; |
| 33 | +import static org.assertj.core.api.Assertions.assertThat; |
34 | 34 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
35 | 35 | import static org.junit.jupiter.api.Assertions.assertNotNull;
|
36 | 36 | import static org.mockito.Mockito.when;
|
@@ -126,14 +126,15 @@ void testRestartApp() throws Exception {
|
126 | 126 | void testPathAnnotation() throws Exception {
|
127 | 127 | assertNotNull(this.controller.getClass()
|
128 | 128 | .getAnnotations());
|
129 |
| - assertThat("The controller has the annotation Path", |
130 |
| - this.controller.getClass() |
131 |
| - .isAnnotationPresent(Path.class)); |
132 |
| - |
133 |
| - final Path path = this.controller.getClass() |
134 |
| - .getAnnotation(Path.class); |
135 |
| - assertThat("The path is /app_details", path.value(), |
136 |
| - is("/app_details")); |
| 129 | + |
| 130 | + assertThat(this.controller.getClass().isAnnotationPresent(Path.class)) |
| 131 | + .as("The controller has the annotation Path") |
| 132 | + .isTrue(); |
| 133 | + |
| 134 | + final Path path = this.controller.getClass().getAnnotation(Path.class); |
| 135 | + assertThat(path.value()) |
| 136 | + .as("The path is /app_details") |
| 137 | + .isEqualTo("/app_details"); |
137 | 138 | }
|
138 | 139 |
|
139 | 140 | @Test
|
|
0 commit comments