JdbcNonTransactionalStore extends JdbcTransactionalStore { @Override public final boolean isInTransaction() { throw new RuntimeException("Does not support transactions."); }  @Override final void beginTransaction(); @Override final void commitTransaction(); @Override final void rollbackTransaction(); @Override final boolean isInTransaction(); @Override void connect(); @Override long getCommittedWindowId(String appId, int operatorId); @Override void disconnect();  }
@Test public void isInTransactionTest() { JdbcNonTransactionalStore jdbcNonTransactionalStore = new JdbcNonTransactionalStore(); try { jdbcNonTransactionalStore.isInTransaction(); } catch (RuntimeException e) { return; } Assert.fail("Exception should be thrown"); }