MpegTsInputTransformer implements InputTransformer { public void setSecurityClassificationDefault(String classification) { notNull(classification, CLASSIFICATION_MUST_BE_NON_NULL); klvProcessor.accept( new BaseKlvProcessorVisitor() { @Override public void visit(SecurityClassificationKlvProcessor securityClassificationKlvProcessor) { securityClassificationKlvProcessor.setDefaultSecurityClassification(classification); } }); } MpegTsInputTransformer(
      InputTransformer inputTransformer,
      List<MetacardType> metacardTypes,
      Stanag4609Processor stanag4609Processor,
      KlvHandlerFactory klvHandlerFactory,
      KlvHandler defaultKlvHandler,
      StanagParserFactory stanagParserFactory,
      KlvProcessor klvProcessor,
      Double distanceTolerance); @SuppressWarnings("unused") void setSubsampleCount(Integer subsampleCount); void setDistanceTolerance(Double distanceTolerance); Double getDistanceTolerance(); @Override Metacard transform(InputStream inputStream); void setSecurityClassificationCode1(String classification); void setSecurityClassificationCode2(String classification); void setSecurityClassificationCode3(String classification); void setSecurityClassificationCode4(String classification); void setSecurityClassificationCode5(String classification); void setSecurityClassificationDefault(String classification); @Override Metacard transform(InputStream inputStream, final String id); static final String CONTENT_TYPE; static final String DATA_TYPE; }
@Test public void testSetSecurityClassificationCodeDefault() { SecurityClassificationKlvProcessor processor = spy( new SecurityClassificationKlvProcessor( mock(SecurityClassificationService.class), Collections.emptyMap(), "")); MpegTsInputTransformer transformer = new MpegTsInputTransformer( inputTransformer, metacardTypes, stanag4609Processor, klvHandlerFactory, defaultKlvHandler, stanagParserFactory, processor, DISTANCE_TOLERANCE); transformer.setSecurityClassificationDefault(CLASSIFICATION); verify(processor).setDefaultSecurityClassification(CLASSIFICATION); }