UdpStreamMonitor implements StreamMonitor { @Override public Optional<URI> getStreamUri() { if (streamUri == null) { return Optional.empty(); } return Optional.of(streamUri); } UdpStreamMonitor(final BundleContext bundleContext);   UdpStreamMonitor(UdpStreamProcessor udpStreamProcessor); void setStreamCreationPlugin(StreamCreationPlugin streamCreationPlugin); void setStreamShutdownPlugin(StreamShutdownPlugin streamShutdownPlugin); Boolean getStartImmediately(); void setStartImmediately(Boolean startImmediately); Double getDistanceTolerance(); void setDistanceTolerance(Double distanceTolerance); String getNetworkInterface(); void setNetworkInterface(String networkInterface); void setParentMetacardUpdater(MetacardUpdater parentMetacardUpdater); Long getMetacardUpdateInitialDelay(); void setMetacardUpdateInitialDelay(Long metacardUpdateInitialDelay); void setFilenameGenerator(FilenameGenerator filenameGenerator); void setFilenameTemplate(String template); String getFileNameTemplate(); void setRolloverCondition(RolloverCondition rolloverCondition); void setUuidGenerator(final UuidGenerator uuidGenerator); void init(); @Override void startMonitoring(); @Override void stopMonitoring(); @Override boolean isMonitoring(); void setParentTitle(String parentTitle); String getStartDateAsString(); @Override Optional<URI> getStreamUri(); @Override Optional<String> getTitle(); void setMetacardTypeList(List<MetacardType> metacardTypeList); void setCatalogFramework(CatalogFramework catalogFramework); void destroy(int arg); void setStreamEndPlugin(StreamEndPlugin streamEndPlugin); void updateCallback(Map<String, Object> properties); String getMonitoredAddress(); void setMonitoredAddress(String monitoredAddress); Integer getByteCountRolloverCondition(); void setMegabyteCountRolloverCondition(Integer count); Long getElapsedTimeRolloverCondition(); void setElapsedTimeRolloverCondition(Long milliseconds); static final long MEGABYTE_COUNT_MIN; static final long MEGABYTE_COUNT_MAX; static final long ELAPSED_TIME_MIN; static final long ELAPSED_TIME_MAX; static final String METATYPE_TITLE; static final String METATYPE_MONITORED_ADDRESS; static final String METATYPE_BYTE_COUNT_ROLLOVER_CONDITION; static final String METATYPE_ELAPSED_TIME_ROLLOVER_CONDITION; static final String METATYPE_METACARD_UPDATE_INITIAL_DELAY; static final String METATYPE_FILENAME_TEMPLATE; static final String METATYPE_DISTANCE_TOLERANCE; static final String METATYPE_NETWORK_INTERFACE; }
@Test public void testGetNullStreamUri() { assertThat(udpStreamMonitor.getStreamUri().isPresent(), is(false)); }
@Test public void testGetStreamUri() { String addr = "udp: udpStreamMonitor.setMonitoredAddress(addr); assertThat(udpStreamMonitor.getStreamUri().get().toString(), is(addr)); assertThat(udpStreamMonitor.getMonitoredAddress(), is("127.0.0.1")); }