@Test
public void itShouldRegisterComponents() throws Exception {

    Object[] expectedComponents = {
            components.eventsResource(),
            components.eventRegistrationsResource(),
            components.eventRunsResource(),
            components.eventResultsResource(),
            components.handicapGroupsResource(),
            components.handicapGroupSetsResource(),
            components.competitionGroupsResource(),
            components.competitionGroupSetsResource(),
            components.domainServiceExceptionMapper(),
            components.runtimeExceptionUnwrappingMapper()
    };
    application.run(config, environment);
    Arrays.stream(expectedComponents).forEach(o -> verify(jersey).register(o));
    verifyNoMoreInteractions(jersey);
}