### Question:
FreeformQuery extends AbstractTransactionalQuery implements
        QueryDelegate { @Override public int storeRow(RowItem row) throws SQLException { if (!isInTransaction()) { throw new IllegalStateException("No transaction is active!"); } else if (primaryKeyColumns.isEmpty()) { throw new UnsupportedOperationException( "Cannot store items fetched with a read-only freeform query!"); } if (delegate != null) { return delegate.storeRow(getConnection(), row); } else { throw new UnsupportedOperationException( "FreeFormQueryDelegate not set!"); } } @SuppressWarnings("unused") private  FreeformQuery(); @Deprecated  FreeformQuery(String queryString, List<String> primaryKeyColumns,
            JDBCConnectionPool connectionPool);  FreeformQuery(String queryString, JDBCConnectionPool connectionPool,
            String... primaryKeyColumns); @Override int getCount(); @Override @SuppressWarnings({ "deprecation", "finally" }) ResultSet getResults(int offset, int pagelength); @Override @SuppressWarnings("deprecation") boolean implementationRespectsPagingLimits(); @Override void setFilters(List<Filter> filters); @Override void setOrderBy(List<OrderBy> orderBys); @Override int storeRow(RowItem row); @Override boolean removeRow(RowItem row); @Override synchronized void beginTransaction(); @Override synchronized void commit(); @Override synchronized void rollback(); @Override List<String> getPrimaryKeyColumns(); String getQueryString(); FreeformQueryDelegate getDelegate(); void setDelegate(FreeformQueryDelegate delegate); @Override @SuppressWarnings("deprecation") boolean containsRowWithKey(Object... keys);  }### Answer:
@Test(expected = IllegalStateException.class) public void storeRow_noDelegateNoTransactionActive_shouldFail() throws SQLException { FreeformQuery query = new FreeformQuery("SELECT * FROM people", Arrays.asList("ID"), connectionPool); query.storeRow(new RowItem(new SQLContainer(query), new RowId( new Object[] { 1 }), null)); }