NoopTransaction implements DataStoreTransaction { @Override public Object loadObject(Class<?> entityClass, Serializable id, Optional<FilterExpression> filterExpression, RequestScope scope) { Object entity; try { entity = entityClass.newInstance(); } catch (IllegalAccessException | InstantiationException e) { log.error("Could not load object {} through NoopStore", entityClass, e); throw new RuntimeException(e); } String uuid = scope.getUUIDFor(entity); new PersistentResource<>(entity, null, uuid, scope).setId(id.toString()); return entity; }  @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 testLoadObject() throws Exception { NoopBean bean = (NoopBean) tx.loadObject(NoopBean.class, 1, Optional.empty(), requestScope); assertEquals((Long) 1L, bean.getId()); }