StanagParserFactoryImpl implements StanagParserFactory { @Override public Stanag4609Parser createParser(ByteSource byteSource) { return () -> { try { return new Stanag4609TransportStreamParser(byteSource).parse(); } catch (Exception e) { throw new Stanag4609ParseException("unable to parse stanag 4609 data", e); } }; }  @Override Stanag4609Parser createParser(ByteSource byteSource);  }
@Test public void testCreateParser() { StanagParserFactoryImpl stanagParserFactory = new StanagParserFactoryImpl(); assertThat(stanagParserFactory.createParser(mock(ByteSource.class)), notNullValue()); }