source: class CollectingServiceImplTest {
  
      @Mock
      private DecodingDataRecordService m_decodingDataRecordService;
      private IpfixCachingService m_cachingService;
      @Mock
      private DeviceCacheService m_deviceFamilyCacheService;
      @Mock
      private DataHandlerService m_dataHandlerService;
      private byte[] m_data;
      @Rule
      public final EnvironmentVariables m_environmentVariables;
  
      @Test
      public void testCreateIpfixMessage() {
  
target:         try {
              byte[] data = IpfixUtilities.hexStringToByteArray("0103002000");
              CollectingServiceImpl collectingService = new CollectingServiceImpl(m_decodingDataRecordService, m_cachingService,
                      m_dataHandlerService, m_deviceFamilyCacheService);
              collectingService.createIpfixMessage(data);
              fail();
          } catch (NotEnoughBytesException e) {
              assertEquals("The IPFIX message is not correct formatted", e.getMessage());
          }
      }
  
  }