NoopTransaction implements DataStoreTransaction { @Override public Iterable<Object> loadObjects(Class<?> entityClass, Optional<FilterExpression> filterExpression, Optional<Sorting> sorting, Optional<Pagination> pagination, RequestScope scope) { return Collections.singletonList(this.loadObject(entityClass, 1L, filterExpression, scope)); }  @Override void save(Object entity, RequestScope scope); @Override void delete(Object entity, RequestScope scope); @Override void flush(RequestScope scope); @Override void commit(RequestScope scope); @Override void createObject(Object entity, RequestScope scope); @Override Object loadObject(Class<?> entityClass,
                             Serializable id,
                             Optional<FilterExpression> filterExpression,
                             RequestScope scope); @Override Iterable<Object> loadObjects(Class<?> entityClass,
                                        Optional<FilterExpression> filterExpression,
                                        Optional<Sorting> sorting,
                                        Optional<Pagination> pagination,
                                        RequestScope scope); @Override void close();  }
@Test public void testLoadObjects() throws Exception { Iterable<NoopBean> iterable = (Iterable) tx.loadObjects(NoopBean.class, Optional.empty(), Optional.empty(), Optional.empty(), requestScope); NoopBean bean = IterableUtils.first(iterable); assertEquals((Long) 1L, bean.getId()); }