@Test public void initNoAnalyses() throws Exception { PropertiesConfiguration configuration = new PropertiesConfiguration(); configuration.addProperty(CONFKEY_ANALYSIS_COG_ENABLED, false); configuration.addProperty(CONFKEY_ANALYSIS_SOG_ENABLED, false); configuration.addProperty(CONFKEY_ANALYSIS_TYPESIZE_ENABLED, false); configuration.addProperty(CONFKEY_ANALYSIS_DRIFT_ENABLED, false); configuration.addProperty(CONFKEY_ANALYSIS_SUDDENSPEEDCHANGE_ENABLED, false); configuration.addProperty(CONFKEY_ANALYSIS_CLOSEENCOUNTER_ENABLED, false); configuration.addProperty(CONFKEY_ANALYSIS_FREEFLOW_ENABLED, false); final JUnit4Mockery context = new JUnit4Mockery(); Injector injectorMock = context.mock(Injector.class); context.checking(new Expectations() {{ }}); PacketHandlerImpl sut = new PacketHandlerImpl(configuration, injectorMock, null, null, null, null); Set<Analysis> analyses = sut.getAnalyses(); assertEquals(0, analyses.size()); }
Set<Analysis> getAnalyses() { return this.analyses; }
PacketHandlerImpl implements PacketHandler { Set<Analysis> getAnalyses() { return this.analyses; } }
PacketHandlerImpl implements PacketHandler { Set<Analysis> getAnalyses() { return this.analyses; } @Inject  PacketHandlerImpl(
            Configuration configuration,
            Injector injector,
            AppStatisticsService statisticsService,
            EventEmittingTracker tracker,
            Set<IPacketFilter> filters,
            @Named("shipNameFilter") Predicate<AisPacket> shipNameFilter
    ); }
PacketHandlerImpl implements PacketHandler { Set<Analysis> getAnalyses() { return this.analyses; } @Inject  PacketHandlerImpl(
            Configuration configuration,
            Injector injector,
            AppStatisticsService statisticsService,
            EventEmittingTracker tracker,
            Set<IPacketFilter> filters,
            @Named("shipNameFilter") Predicate<AisPacket> shipNameFilter
    ); void accept(final AisPacket packet); }
PacketHandlerImpl implements PacketHandler { Set<Analysis> getAnalyses() { return this.analyses; } @Inject  PacketHandlerImpl(
            Configuration configuration,
            Injector injector,
            AppStatisticsService statisticsService,
            EventEmittingTracker tracker,
            Set<IPacketFilter> filters,
            @Named("shipNameFilter") Predicate<AisPacket> shipNameFilter
    ); void accept(final AisPacket packet);  }