Remove tests related to duplicate event type registration
which I forgot to remove in eabc8ad3.
Change-Id: If04a644fd626bbfb82e75eed22a93a6d5b4e500a
diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/events/EventTypesTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/events/EventTypesTest.java
index 1073522..7eed35f 100644
--- a/gerrit-server/src/test/java/com/google/gerrit/server/events/EventTypesTest.java
+++ b/gerrit-server/src/test/java/com/google/gerrit/server/events/EventTypesTest.java
@@ -15,7 +15,6 @@
package com.google.gerrit.server.events;
import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assert.fail;
import org.junit.Test;
@@ -26,12 +25,6 @@
}
}
- public static class TestEvent2 extends Event {
- public TestEvent2() {
- super("test-event"); // Intentionally same as in TestEvent
- }
- }
-
public static class AnotherTestEvent extends Event {
public AnotherTestEvent() {
super("another-test-event");
@@ -45,20 +38,6 @@
assertThat(EventTypes.getClass("test-event")).isEqualTo(TestEvent.class);
assertThat(EventTypes.getClass("another-test-event"))
.isEqualTo(AnotherTestEvent.class);
-
- try {
- EventTypes.registerClass(new TestEvent());
- fail("Expected IllegalArgumentException");
- } catch (IllegalArgumentException e) {
- assertThat(EventTypes.getClass("test-event")).isEqualTo(TestEvent.class);
- }
-
- try {
- EventTypes.registerClass(new TestEvent2());
- fail("Expected IllegalArgumentException");
- } catch (IllegalArgumentException e) {
- assertThat(EventTypes.getClass("test-event")).isEqualTo(TestEvent.class);
- }
}
@Test