TransactionWrapper implements DataStoreTransaction { @Override public void setAttribute(Object entity, String attributeName, Object attributeValue, RequestScope scope) { tx.setAttribute(entity, attributeName, attributeValue, scope); }  @Override User accessUser(Object opaqueUser); @Override void preCommit(); @Override T createNewObject(Class<T> entityClass); @Override Object loadObject(Class<?> entityClass, Serializable id, Optional<FilterExpression> filterExpression,
                             RequestScope scope); @Override Object getRelation(DataStoreTransaction relationTx, Object entity, String relationName,
                              Optional<FilterExpression> filterExpression, Optional<Sorting> sorting,
                              Optional<Pagination> pagination, RequestScope scope); @Override void updateToManyRelation(DataStoreTransaction relationTx, Object entity, String relationName,
                                     Set<Object> newRelationships, Set<Object> deletedRelationships,
                                     RequestScope scope); @Override void updateToOneRelation(DataStoreTransaction relationTx, Object entity,
                                    String relationName, Object relationshipValue, RequestScope scope); @Override Object getAttribute(Object entity, String attributeName, RequestScope scope); @Override void setAttribute(Object entity, String attributeName, Object attributeValue, RequestScope scope); @Override FeatureSupport supportsFiltering(Class<?> entityClass, FilterExpression expression); @Override boolean supportsSorting(Class<?> entityClass, Sorting sorting); @Override boolean supportsPagination(Class<?> entityClass); @Override void save(Object o, RequestScope requestScope); @Override void delete(Object o, RequestScope requestScope); @Override void flush(RequestScope requestScope); @Override void commit(RequestScope requestScope); @Override void createObject(Object o, RequestScope requestScope); @Override Iterable<Object> loadObjects(Class<?> entityClass,
                                        Optional<FilterExpression> filterExpression,
                                        Optional<Sorting> sorting,
                                        Optional<Pagination> pagination,
                                        RequestScope requestScope); @Override void close();  }
@Test public void testSetAttribute() { DataStoreTransaction wrapped = mock(DataStoreTransaction.class); DataStoreTransaction wrapper = new TestTransactionWrapper(wrapped); wrapper.setAttribute(null, null, null, null); verify(wrapped, times(1)).setAttribute(any(), any(), any(), any()); }