@Test void testDuplicateHandlersRejected() { DuplicateCommandHandlerResolver testSubject = DuplicateCommandHandlerResolution.rejectDuplicates(); try { testSubject.resolve("testCommand", initialHandler, duplicateHandler); fail("Expected DuplicateCommandHandlerSubscriptionException"); } catch (DuplicateCommandHandlerSubscriptionException e) { assertTrue(e.getMessage().contains("[testCommand]")); assertTrue(e.getMessage().contains("Handler2]")); assertTrue(e.getMessage().contains("Handler1]")); } }
public static DuplicateCommandHandlerResolver rejectDuplicates() { return FailingDuplicateCommandHandlerResolver.instance(); }
DuplicateCommandHandlerResolution { public static DuplicateCommandHandlerResolver rejectDuplicates() { return FailingDuplicateCommandHandlerResolver.instance(); } }
DuplicateCommandHandlerResolution { public static DuplicateCommandHandlerResolver rejectDuplicates() { return FailingDuplicateCommandHandlerResolver.instance(); }  }
DuplicateCommandHandlerResolution { public static DuplicateCommandHandlerResolver rejectDuplicates() { return FailingDuplicateCommandHandlerResolver.instance(); }  static DuplicateCommandHandlerResolver logAndOverride(); static DuplicateCommandHandlerResolver rejectDuplicates(); static DuplicateCommandHandlerResolver silentOverride(); }
DuplicateCommandHandlerResolution { public static DuplicateCommandHandlerResolver rejectDuplicates() { return FailingDuplicateCommandHandlerResolver.instance(); }  static DuplicateCommandHandlerResolver logAndOverride(); static DuplicateCommandHandlerResolver rejectDuplicates(); static DuplicateCommandHandlerResolver silentOverride();  }