Search in sources :

Example 1 with DecodedKLVMetadataPacket

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);
}
Also used : DecodedKLVMetadataPacket(org.codice.alliance.libs.stanag4609.DecodedKLVMetadataPacket) KlvContext(org.codice.ddf.libs.klv.KlvContext) List(java.util.List) Test(org.junit.Test)

Aggregations

List (java.util.List)1 DecodedKLVMetadataPacket (org.codice.alliance.libs.stanag4609.DecodedKLVMetadataPacket)1 KlvContext (org.codice.ddf.libs.klv.KlvContext)1 Test (org.junit.Test)1