use of org.codice.alliance.libs.stanag4609.DecodedKLVMetadataPacket in project alliance by codice.
the class Stanag4609ProcessorImplTest method testHandleWithStanagMetadata.
@Test
public void testHandleWithStanagMetadata() throws KlvDecodingException {
DecodedKLVMetadataPacket p2 = mock(DecodedKLVMetadataPacket.class);
when(p2.getDecodedKLV()).thenReturn(new KlvContext(Klv.KeyLength.OneByte, Klv.LengthEncoding.OneByte, Collections.singleton(klvIntegerEncodedFloatingPoint)));
Map<String, KlvHandler> handlers = Collections.singletonMap(FIELD_NAME, klvHandler);
Map<Integer, List<DecodedKLVMetadataPacket>> stanag = Collections.singletonMap(1, Collections.singletonList(p2));
stanag4609Processor.handle(handlers, defaultKlvHandler, stanag);
verify(klvHandler, atLeastOnce()).accept(klvIntegerEncodedFloatingPoint);
}
Aggregations