@Test
void testNoCountElement() {

    final String inputPath = INPUT_DIR + "input05_noCountOrValue.xml";
    final ByteArrayInputStream input = new ByteArrayInputStream(getString(inputPath).getBytes());
    final StatisticStoreStore statisticStoreStore = getStore();
    final DocRef docRef = statisticStoreStore.createDocument(STAT_NAME);
    final StatisticStoreDoc statisticsDataSource = statisticStoreStore.readDocument(docRef);
    // xml has a value element so set this to count
    statisticsDataSource.setStatisticType(StatisticType.COUNT);
    statisticsDataSource.setConfig(new StatisticsDataSourceData(
            Arrays.asList(new StatisticField("tag1name"), new StatisticField("tag2name"))));
    statisticsDataSource.setEnabled(true);
    statisticStoreStore.writeDocument(statisticsDataSource);
    final ErrorReceiverProxy errorReceiverProxy = new ErrorReceiverProxy(new FatalErrorReceiver());
    final StatisticsFilter statisticsFilter = new StatisticsFilter(errorReceiverProxy,
            new LocationFactoryProxy(), this, statisticStoreStore);
    statisticsFilter.setStatisticsDataSource(docRef);
    // will throw an error as the type in the xml doesn't match the type in
    // the SDS
    ProcessorUtil.processXml(input, errorReceiverProxy, statisticsFilter, new LocationFactoryProxy());
    assertThat(testEvents.size()).as("Expecting 1 event").isEqualTo(1);
    assertThat(testEvents.get(0).getCount()).isEqualTo(1L);
}