@Test
public void testCreateChannelHandlers() {

  StreamMonitor streamMonitor = mock(StreamMonitor.class);
  when(streamMonitor.getTitle()).thenReturn(Optional.of("title"));
  when(streamMonitor.getStreamUri()).thenReturn(Optional.of(URI.create("udp://127.0.0.1:80")));
  RolloverCondition rolloverCondition = mock(RolloverCondition.class);
  String filenameTemplate = "template";
  FilenameGenerator filenameGenerator = mock(FilenameGenerator.class);
  List<MetacardType> metacardTypeList = Collections.singletonList(mock(MetacardType.class));
  CatalogFramework catalogFramework = mock(CatalogFramework.class);
  UdpStreamProcessor udpStreamProcessor =
      new UdpStreamProcessor(streamMonitor, mockBundleContext);
  udpStreamProcessor.setRolloverCondition(rolloverCondition);
  udpStreamProcessor.setFilenameTemplate(filenameTemplate);
  udpStreamProcessor.setFilenameGenerator(filenameGenerator);
  udpStreamProcessor.setMetacardTypeList(metacardTypeList);
  udpStreamProcessor.setCatalogFramework(catalogFramework);
  udpStreamProcessor.setStreamCreationPlugin(context -> {});
  udpStreamProcessor.setStreamShutdownPlugin(mock(StreamShutdownPlugin.class));
  udpStreamProcessor.setParentMetacardUpdater(mock(MetacardUpdater.class));
  udpStreamProcessor.setSecurityLogger(mock(SecurityLogger.class));
  udpStreamProcessor.init();
  try {
    assertThat(udpStreamProcessor.createChannelHandlers(), notNullValue());
  } finally {
    udpStreamProcessor.shutdown();
  }
}