Fix merge issue for ForwardedIndexGroupHandlerTest class Fix following compilation error types: * Duplicate methods, for example: ForwardedIndexGroupHandlerTest.java:148: error: method shouldChangeIndexEventWheNotUpToDate() is already defined in class ForwardedIndexGroupHandlerTest public void shouldChangeIndexEventWheNotUpToDate() throws IOException * Issue with instantiating UUID objects, for example: ForwardedIndexGroupHandlerTest.java:151: error: UUID is abstract; cannot be instantiated Change-Id: I957b3d0b2f9f7b7b466a9f0e4f0b6f41a00cd47f
diff --git a/src/test/java/com/googlesource/gerrit/plugins/multisite/forwarder/ForwardedIndexGroupHandlerTest.java b/src/test/java/com/googlesource/gerrit/plugins/multisite/forwarder/ForwardedIndexGroupHandlerTest.java index 24cbbc2..982ac52 100644 --- a/src/test/java/com/googlesource/gerrit/plugins/multisite/forwarder/ForwardedIndexGroupHandlerTest.java +++ b/src/test/java/com/googlesource/gerrit/plugins/multisite/forwarder/ForwardedIndexGroupHandlerTest.java
@@ -143,28 +143,4 @@ private Optional<GroupIndexEvent> groupIndexEvent(String uuid) { return Optional.of(new GroupIndexEvent(uuid, null)); } - - @Test - public void shouldChangeIndexEventWheNotUpToDate() throws IOException { - ForwardedIndexGroupHandler groupHandlerWithOutdatedEvent = groupHandler(false); - groupHandlerWithOutdatedEvent.index(uuid, Operation.INDEX, groupIndexEvent(uuid)); - verify(indexerMock).index(new AccountGroup.UUID(uuid)); - } - - @Test - public void shouldRescheduleGroupIndexingWhenItIsNotUpToDate() throws IOException { - ForwardedIndexGroupHandler groupHandlerWithOutdatedEvent = groupHandler(false); - groupHandlerWithOutdatedEvent.index(uuid, Operation.INDEX, groupIndexEvent(uuid)); - verify(indexExecutorMock) - .schedule(any(Runnable.class), eq(new Long(RETRY_INTERVAL)), eq(TimeUnit.MILLISECONDS)); - } - - private ForwardedIndexGroupHandler groupHandler(boolean checkIsUpToDate) { - return new ForwardedIndexGroupHandler( - indexerMock, config, new TestGroupChecker(checkIsUpToDate), indexExecutorMock); - } - - private Optional<GroupIndexEvent> groupIndexEvent(String uuid) { - return Optional.of(new GroupIndexEvent(uuid, null)); - } }