Simplify asserts
@@ -537,18 +537,18 @@ public class ControllerTest {
Map<String, EndpointStatus> rotationStatus = tester.controller().applications().getGlobalRotationStatus(deployId);
assertEquals(1, rotationStatus.size());
- assertTrue(rotationStatus.get("qrs-endpoint").getStatus().equals(EndpointStatus.Status.in));
+ assertEquals(rotationStatus.get("qrs-endpoint").getStatus(), EndpointStatus.Status.in);
// Set the global rotations out of service
- EndpointStatus status = new EndpointStatus(EndpointStatus.Status.out, "Testing I said", "Test", tester.clock().instant().getEpochSecond());
+ EndpointStatus status = new EndpointStatus(EndpointStatus.Status.out, "unit-test", "Test", tester.clock().instant().getEpochSecond());
List<String> overrides = tester.controller().applications().setGlobalRotationStatus(deployId, status);
assertEquals(1, overrides.size());
// Recheck the override rotation status
rotationStatus = tester.controller().applications().getGlobalRotationStatus(deployId);
assertEquals(1, rotationStatus.size());
- assertTrue(rotationStatus.get("qrs-endpoint").getStatus().equals(EndpointStatus.Status.out));
- assertTrue(rotationStatus.get("qrs-endpoint").getReason().equals("Testing I said"));
+ assertEquals(rotationStatus.get("qrs-endpoint").getStatus(), EndpointStatus.Status.out);
+ assertEquals("unit-test", rotationStatus.get("qrs-endpoint").getReason());
}
@Test
