H2SnifferPersistence implements SnifferPersistence { @Override public Sniffer getSniffer(final long id) { final List<AspectSniffer> sniffers = jdbcTemplate.query( "SELECT * FROM (" + SnifferRowMapper.SQL_PROJECTION + ") WHERE ID=?", new Object[] { id }, new SnifferRowMapper()); if (sniffers.size() == 1) { return sniffers.get(0); } return null; }  @Override SnifferListBuilder getSnifferListBuilder(); @Override Sniffer getSniffer(final long id); @Override IncrementData getIncrementData(final Sniffer sniffer, final LogSource<?> source, final Log log); @Override Map<Log, IncrementData> getIncrementDataByLog(final Sniffer sniffer, final LogSource<?> source); @Override void storeIncrementalData(final Sniffer observer, final LogSource<?> source, final Log log,
			final IncrementData data); @Override long createSniffer(final Sniffer sniffer); @Override void updateSniffer(final Sniffer sniffer); @Override @Transactional void deleteSniffer(final Sniffer sniffer);  }
@Test @DirtiesContext public void testModelPrior_4_2_1() { final String snifferInsert = "INSERT INTO PUBLIC.SNIFFERS(ID, NAME, CRON_EXPR, SOURCE, SCANNER_CONFIG, READER_STRATEGY_CONFIG, PUBLISHERS_CONFIG) VALUES(1, 'S1', '-', 1, '{\"@type\":\"LevelScanner\",\"severityNumber\":5,\"comparator\":\"EQ_OR_GREATER\",\"fieldTypes\":{}}', '{\"@type\":\"MinBAmountReadStrategy\",\"minBytesAmount\":2}', '[{\"@type\":\"MailPublisher\",\"to\":null,\"subject\":null,\"from\":null,\"textMessage\":\"Event link: $eventLink\"}]')"; jdbcTpl.update(snifferInsert); final Sniffer checkSniffer = snifferPersistence.getSniffer(1); Assert.assertNotNull(checkSniffer); Assert.assertTrue(checkSniffer.getScanner() instanceof FilteredScanner); checkS1Sniffer(checkSniffer); }