Stanag4609ProcessorImpl implements Stanag4609Processor { @Override public void callDataElementHandlers( Map<String, KlvHandler> handlers, KlvHandler defaultHandler, KlvDataElement klvDataElement, Map<String, KlvDataElement> dataElements) { handlers.getOrDefault(klvDataElement.getName(), defaultHandler).accept(klvDataElement); dataElements.put(klvDataElement.getName(), klvDataElement); } Stanag4609ProcessorImpl(PostProcessor postProcessor); @Override void handle(
      Map<String, KlvHandler> handlers,
      KlvHandler defaultHander,
      Map<Integer, List<DecodedKLVMetadataPacket>> stanagMetadata); @Override void handle(
      Map<String, KlvHandler> handlers,
      KlvHandler defaultHandler,
      KlvContext klvContext,
      Map<String, KlvDataElement> dataElements); @Override void handle(
      Map<String, KlvHandler> handlers,
      KlvHandler defaultHandler,
      KlvDataElement klvDataElement,
      Map<String, KlvDataElement> dataElements); @Override void callDataElementHandlers(
      Map<String, KlvHandler> handlers,
      KlvHandler defaultHandler,
      KlvDataElement klvDataElement,
      Map<String, KlvDataElement> dataElements); @Override void handle(
      Map<String, KlvHandler> handlers,
      KlvHandler defaultHandler,
      KlvLocalSet klvLocalSet,
      Map<String, KlvDataElement> dataElements);  }
@Test public void testRegularHandlerForCallDataElementHandlers() throws KlvDecodingException { stanag4609Processor.callDataElementHandlers( Collections.singletonMap(FIELD_NAME, klvHandler), defaultKlvHandler, klvIntegerEncodedFloatingPoint, dataElements); verify(klvHandler, atLeastOnce()).accept(klvIntegerEncodedFloatingPoint); }
@Test public void testDefaultHandlerForCallDataElementHandlers() throws KlvDecodingException { KlvIntegerEncodedFloatingPoint otherKlvIntegerEncodedFloatingPoint = KlvUtilities.createTestFloat("someOtherField", 100); stanag4609Processor.callDataElementHandlers( Collections.singletonMap(FIELD_NAME, klvHandler), defaultKlvHandler, otherKlvIntegerEncodedFloatingPoint, dataElements); verify(defaultKlvHandler, atLeastOnce()).accept(otherKlvIntegerEncodedFloatingPoint); }