diff --git a/src/test/java/org/springframework/data/ebean/repository/sample/SampleConfig.java b/src/test/java/org/springframework/data/ebean/repository/sample/SampleConfig.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/springframework/data/ebean/repository/sample/SampleConfig.java
+++ b/src/test/java/org/springframework/data/ebean/repository/sample/SampleConfig.java
@@ -2,6 +2,7 @@ package org.springframework.data.ebean.repository.sample;
 
 import io.ebean.EbeanServer;
 import io.ebean.EbeanServerFactory;
+import io.ebean.config.CurrentUserProvider;
 import io.ebean.config.ServerConfig;
 import io.ebean.spring.txn.SpringJdbcTransactionManager;
 import org.springframework.context.annotation.Bean;
@@ -50,6 +51,13 @@ public class SampleConfig {
         config.setAutoCommitMode(false);
         config.setExpressionNativeIlike(true);
 
+        config.setCurrentUserProvider(new CurrentUserProvider() {
+            @Override
+            public Object currentUser() {
+                return "test"; // just for test, can rewrite to get the currentUser from threadLocal
+            }
+        });
+
         return config;
     }
ADD currentUserProvider for test