From 8edc892274f037f60f30e80b36e9d0de7f5e817d Mon Sep 17 00:00:00 2001 From: mon0mon Date: Sat, 30 Sep 2023 17:13:21 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=90=9Bfix=20-=20User=20=EC=97=94?= =?UTF-8?q?=ED=8B=B0=ED=8B=B0=EC=9D=98=20nickname=20=EC=B9=BC=EB=9F=BC?= =?UTF-8?q?=EC=9C=84=EC=97=90=20=EC=96=B4=EB=85=B8=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80=20-=20=EC=A0=9C=EC=95=BD?= =?UTF-8?q?=EC=82=AC=ED=95=AD=20=EC=B6=94=EA=B0=80=20(nullable=20->=20fals?= =?UTF-8?q?e,=20unique=20->=20true)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/java/mutsa/common/domain/models/user/User.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/src/main/java/mutsa/common/domain/models/user/User.java b/common/src/main/java/mutsa/common/domain/models/user/User.java index a217aee..b94d540 100644 --- a/common/src/main/java/mutsa/common/domain/models/user/User.java +++ b/common/src/main/java/mutsa/common/domain/models/user/User.java @@ -39,6 +39,8 @@ public class User extends BaseTimeEntity implements Serializable { @Column(nullable = false, unique = true) private String username; + + @Column(nullable = false, unique = true) private String nickname; @Column(nullable = false) From b7aa19435d802a19352ba8ebb9a0532f55556b18 Mon Sep 17 00:00:00 2001 From: mon0mon Date: Sat, 30 Sep 2023 17:13:59 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=E2=99=BB=EF=B8=8Frefactor=20-=20BootstrapD?= =?UTF-8?q?ataLoader=EC=97=90=EC=84=9C=20=EC=83=9D=EC=84=B1=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EB=AA=A8=EB=93=A0=20=EC=9C=A0=EC=A0=80=EC=97=90=20?= =?UTF-8?q?nickname=20=EA=B0=92=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/mutsa/common/BootstrapDataLoader.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/mutsa/common/BootstrapDataLoader.java b/common/src/main/java/mutsa/common/BootstrapDataLoader.java index b19d98d..1c27666 100644 --- a/common/src/main/java/mutsa/common/BootstrapDataLoader.java +++ b/common/src/main/java/mutsa/common/BootstrapDataLoader.java @@ -53,6 +53,7 @@ public void createAdminUser() { admin.put("email", "mutsaproject@gmail.com"); admin.put("image_url", ""); admin.put("role", RoleStatus.ROLE_ADMIN); + admin.put("nickname", "admin_nick"); loadUser(admin); } @@ -124,7 +125,7 @@ private User loadUser(Map attributes) { String email = (String) attributes.get("email"); String imageUrl = (String) attributes.get("image_url"); String password = (String) attributes.get("password"); - String nickname = (String) attributes.get("password"); + String nickname = (String) attributes.get("nickname"); RoleStatus role = (RoleStatus) attributes.get("role"); HashMap necessaryAttributes = createNecessaryAttributes(apiId, login, @@ -223,6 +224,7 @@ public User createTestUser1() { testUser1.put("email", "qwer@gmail.com"); testUser1.put("image_url", ""); testUser1.put("role", RoleStatus.ROLE_USER); + testUser1.put("nickname", "test-user1"); return loadUser(testUser1); } @@ -235,6 +237,7 @@ public User createTestUser2() { testUser2.put("email", "asdf@gmail.com"); testUser2.put("image_url", ""); testUser2.put("role", RoleStatus.ROLE_USER); + testUser2.put("nickname", "test-user2"); return loadUser(testUser2); } @@ -246,7 +249,7 @@ public void createReport() { "reporter1@gmail.com", null, null, - null + "ReportControllerTestUser1-nick" ); reporter1 = userRepository.save(reporter1); @@ -256,7 +259,7 @@ public void createReport() { "reportedUser@gmail.com", null, null, - null + "ReportControllerTestUser2-nick" ); reportedUser = userRepository.save(reportedUser); From ce8eba96a64abd646d952c1341a2dd0f70478b07 Mon Sep 17 00:00:00 2001 From: mon0mon Date: Sat, 30 Sep 2023 19:41:11 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E2=99=BB=EF=B8=8Frefactor=20-=20CustomAuth?= =?UTF-8?q?orizationFilter=20=EC=98=88=EC=99=B8=20=ED=95=AD=EB=AA=A9=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../filter/CustomAuthorizationFilter.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/api/src/main/java/mutsa/api/config/security/filter/CustomAuthorizationFilter.java b/api/src/main/java/mutsa/api/config/security/filter/CustomAuthorizationFilter.java index 00bdbb5..1c959c3 100644 --- a/api/src/main/java/mutsa/api/config/security/filter/CustomAuthorizationFilter.java +++ b/api/src/main/java/mutsa/api/config/security/filter/CustomAuthorizationFilter.java @@ -40,16 +40,16 @@ public class CustomAuthorizationFilter extends OncePerRequestFilter { private static final List EXCLUDE_URL = List.of("/api/auth/token/refresh", - "/auth/**", - "/ws", - "/oauth2/authorization/**,", - "/api/articles", - "/api/review/{reviewApiId}", - "/api/article/{articleApiId}/review", - "/v3/api-docs/**", - "/configuration/**", - "/webjars/**", - "/swagger-ui/**" +// "/auth/**", + "/ws" +// "/oauth2/authorization/**,", +// "/api/articles", +// "/api/review/{reviewApiId}", +// "/api/article/{articleApiId}/review", +// "/v3/api-docs/**", +// "/configuration/**", +// "/webjars/**", +// "/swagger-ui/**" ); @Override From e1b4bbee88c3fe29ba49f6f240b1baf80ed2776f Mon Sep 17 00:00:00 2001 From: kdybe01 Date: Tue, 3 Oct 2023 21:27:16 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=E2=99=BB=EF=B8=8Frefactor=20:=20=EC=9C=A0?= =?UTF-8?q?=EC=A0=80=20=EC=83=9D=EC=84=B1=20=EC=8B=9C=20nickname=EC=9D=B4?= =?UTF-8?q?=20null=EC=9D=B4=20=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/article/ArticleControllerTest.java | 4 ++-- .../controller/chatroom/ChatroomControllerTest.java | 6 +++--- .../api/controller/order/OrderControllerTest.java | 4 ++-- .../api/controller/payment/PaymentControllerTest.java | 2 +- .../api/controller/review/ReviewControllerTest.java | 6 +++--- .../mutsa/api/repository/ArticleRepositoryTest.java | 4 ++-- .../java/mutsa/api/repository/OrderRepositoryTest.java | 2 +- .../chatroom/ChatroomUserRepositoryTest.java | 4 ++-- .../mutsa/api/service/article/ArticleServiceTest.java | 2 +- .../api/service/chatroom/ChatroomServiceTest.java | 6 +++--- .../api/service/order/OrderModuleServiceTest.java | 6 +++--- .../java/mutsa/api/service/order/OrderServiceTest.java | 4 ++-- .../api/service/payment/PaymentModuleServiceTest.java | 2 +- .../api/service/report/ReportModuleServiceTest.java | 4 ++-- .../mutsa/api/service/report/ReportServiceTest.java | 4 ++-- .../api/service/review/ReviewModuleServiceTest.java | 6 +++--- .../mutsa/api/service/review/ReviewServiceTest.java | 10 +++++----- 17 files changed, 38 insertions(+), 38 deletions(-) diff --git a/api/src/test/java/mutsa/api/controller/article/ArticleControllerTest.java b/api/src/test/java/mutsa/api/controller/article/ArticleControllerTest.java index 838c334..02e7ed3 100644 --- a/api/src/test/java/mutsa/api/controller/article/ArticleControllerTest.java +++ b/api/src/test/java/mutsa/api/controller/article/ArticleControllerTest.java @@ -97,7 +97,7 @@ public void init() { "articlecontrollertestuser1@gmail.com", null, null, - null + "ArticleControllerTestUser1" ); user1 = userRepository.save(user1); @@ -107,7 +107,7 @@ public void init() { "articlecontrollertestuser2@gmail.com", null, null, - null + "ArticleControllerTestUser2" ); user2 = userRepository.save(user2); diff --git a/api/src/test/java/mutsa/api/controller/chatroom/ChatroomControllerTest.java b/api/src/test/java/mutsa/api/controller/chatroom/ChatroomControllerTest.java index 9bae305..685c2c9 100644 --- a/api/src/test/java/mutsa/api/controller/chatroom/ChatroomControllerTest.java +++ b/api/src/test/java/mutsa/api/controller/chatroom/ChatroomControllerTest.java @@ -74,9 +74,9 @@ public static void afterAll() { @BeforeEach public void init() { - seller = User.of("user1", "password", "email1@", "oauthName1", null, null); - seller2 = User.of("seller2", "password", "seller2@", "seller2", null, null); - consumer = User.of("user2", "password", "email2@", "oauthName2", null, null); + seller = User.of("user1", "password", "email1@", "oauthName1", null, "user1"); + seller2 = User.of("seller2", "password", "seller2@", "seller2", null, "seller2"); + consumer = User.of("user2", "password", "email2@", "oauthName2", null, "user2"); seller = userRepository.save(seller); seller2 = userRepository.save(seller2); consumer = userRepository.save(consumer); diff --git a/api/src/test/java/mutsa/api/controller/order/OrderControllerTest.java b/api/src/test/java/mutsa/api/controller/order/OrderControllerTest.java index 94f453c..7c854c3 100644 --- a/api/src/test/java/mutsa/api/controller/order/OrderControllerTest.java +++ b/api/src/test/java/mutsa/api/controller/order/OrderControllerTest.java @@ -88,8 +88,8 @@ public static void afterAll() { @BeforeEach public void init() { - seller = User.of("user1", "password", "email1@", "oauthName1", null, null); - consumer = User.of("user2", "password", "email2@", "oauthName2", null, null); + seller = User.of("user1", "password", "email1@", "oauthName1", null, "user1"); + consumer = User.of("user2", "password", "email2@", "oauthName2", null, "user2"); seller = userRepository.save(seller); consumer = userRepository.save(consumer); diff --git a/api/src/test/java/mutsa/api/controller/payment/PaymentControllerTest.java b/api/src/test/java/mutsa/api/controller/payment/PaymentControllerTest.java index 233d2ce..5f40741 100644 --- a/api/src/test/java/mutsa/api/controller/payment/PaymentControllerTest.java +++ b/api/src/test/java/mutsa/api/controller/payment/PaymentControllerTest.java @@ -92,7 +92,7 @@ public void setup() { } private void initializeEntities() { - consumer = User.of("user2", "password", "email2@", "oauthName2", null, null); + consumer = User.of("user2", "password", "email2@", "oauthName2", null, "user2"); consumer = userRepository.save(consumer); article = Article.builder() diff --git a/api/src/test/java/mutsa/api/controller/review/ReviewControllerTest.java b/api/src/test/java/mutsa/api/controller/review/ReviewControllerTest.java index 8494229..657c40e 100644 --- a/api/src/test/java/mutsa/api/controller/review/ReviewControllerTest.java +++ b/api/src/test/java/mutsa/api/controller/review/ReviewControllerTest.java @@ -83,13 +83,13 @@ public static void afterAll() { @BeforeEach public void init() { - reviewer1 = User.of("user1", "password", "email1@", "oauthName1", null, null); + reviewer1 = User.of("user1", "password", "email1@", "oauthName1", null, "user1"); reviewer1 = userRepository.save(reviewer1); - reviewer2 = User.of("user2", "password", "email2@", "oauthName2", null, null); + reviewer2 = User.of("user2", "password", "email2@", "oauthName2", null, "user2"); reviewer2 = userRepository.save(reviewer2); - User seller = User.of("seller", "password", "sellerEmail@", "sellerOauthName", null, null); + User seller = User.of("seller", "password", "sellerEmail@", "sellerOauthName", null, "seller"); seller = userRepository.save(seller); article = Article.builder() diff --git a/api/src/test/java/mutsa/api/repository/ArticleRepositoryTest.java b/api/src/test/java/mutsa/api/repository/ArticleRepositoryTest.java index 74461db..c418a7e 100644 --- a/api/src/test/java/mutsa/api/repository/ArticleRepositoryTest.java +++ b/api/src/test/java/mutsa/api/repository/ArticleRepositoryTest.java @@ -46,11 +46,11 @@ public class ArticleRepositoryTest { @BeforeEach public void init() { - user1 = User.of("ArticleRepositoryTestUser1", "1234", "user1@gmail.com", null, null, null); + user1 = User.of("ArticleRepositoryTestUser1", "1234", "user1@gmail.com", null, null, "ArticleRepositoryTestUser1"); user1 = userRepository.save(user1); - user2 = User.of("ArticleRepositoryTestUser2", "1234", "user2@gmail.com", null, null, null); + user2 = User.of("ArticleRepositoryTestUser2", "1234", "user2@gmail.com", null, null, "ArticleRepositoryTestUser2"); user2 = userRepository.save(user2); diff --git a/api/src/test/java/mutsa/api/repository/OrderRepositoryTest.java b/api/src/test/java/mutsa/api/repository/OrderRepositoryTest.java index 73f6bab..fc32447 100644 --- a/api/src/test/java/mutsa/api/repository/OrderRepositoryTest.java +++ b/api/src/test/java/mutsa/api/repository/OrderRepositoryTest.java @@ -55,7 +55,7 @@ public class OrderRepositoryTest { @BeforeEach public void init() { - user = userRepository.save(User.of("user", "password", "email", "oauthName", null, null)); + user = userRepository.save(User.of("user", "password", "email", "oauthName", null, "user")); when(userService.getByApiId(any())).thenReturn(user); article = articleRepository.save(Article.builder() diff --git a/api/src/test/java/mutsa/api/repository/chatroom/ChatroomUserRepositoryTest.java b/api/src/test/java/mutsa/api/repository/chatroom/ChatroomUserRepositoryTest.java index d61de1c..5eb29a1 100644 --- a/api/src/test/java/mutsa/api/repository/chatroom/ChatroomUserRepositoryTest.java +++ b/api/src/test/java/mutsa/api/repository/chatroom/ChatroomUserRepositoryTest.java @@ -35,8 +35,8 @@ class ChatroomUserRepositoryTest { @BeforeEach public void init() { - user1 = User.of("user1", "password", "email1@", "oauthName1", null, null); - user2 = User.of("seller2", "password", "seller2@", "seller2", null, null); + user1 = User.of("user1", "password", "email1@", "oauthName1", null, "user1"); + user2 = User.of("seller2", "password", "seller2@", "seller2", null, "seller2"); user1 = userRepository.save(user1); user2 = userRepository.save(user2); diff --git a/api/src/test/java/mutsa/api/service/article/ArticleServiceTest.java b/api/src/test/java/mutsa/api/service/article/ArticleServiceTest.java index a0ac682..10c5517 100644 --- a/api/src/test/java/mutsa/api/service/article/ArticleServiceTest.java +++ b/api/src/test/java/mutsa/api/service/article/ArticleServiceTest.java @@ -50,7 +50,7 @@ public class ArticleServiceTest { @BeforeEach public void init() { - user = User.of("ArticleServiceTestUser", "1234", "user1@gmail.com", null, null, null); + user = User.of("ArticleServiceTestUser", "1234", "user1@gmail.com", null, null, "ArticleServiceTestUser"); user = userRepository.save(user); diff --git a/api/src/test/java/mutsa/api/service/chatroom/ChatroomServiceTest.java b/api/src/test/java/mutsa/api/service/chatroom/ChatroomServiceTest.java index e48899e..a0a90b6 100644 --- a/api/src/test/java/mutsa/api/service/chatroom/ChatroomServiceTest.java +++ b/api/src/test/java/mutsa/api/service/chatroom/ChatroomServiceTest.java @@ -46,9 +46,9 @@ class ChatroomServiceTest { @BeforeEach public void init() { - seller = User.of("user1", "password", "email1@", "oauthName1", null, null); - seller2 = User.of("seller2", "password", "seller2@", "seller2", null, null); - consumer = User.of("user2", "password", "email2@", "oauthName2", null, null); + seller = User.of("user1", "password", "email1@", "oauthName1", null, "user1"); + seller2 = User.of("seller2", "password", "seller2@", "seller2", null, "seller2"); + consumer = User.of("user2", "password", "email2@", "oauthName2", null, "user2"); seller = userRepository.save(seller); seller2 = userRepository.save(seller2); consumer = userRepository.save(consumer); diff --git a/api/src/test/java/mutsa/api/service/order/OrderModuleServiceTest.java b/api/src/test/java/mutsa/api/service/order/OrderModuleServiceTest.java index d901021..1e02de9 100644 --- a/api/src/test/java/mutsa/api/service/order/OrderModuleServiceTest.java +++ b/api/src/test/java/mutsa/api/service/order/OrderModuleServiceTest.java @@ -61,9 +61,9 @@ class OrderModuleServiceTest { @BeforeEach public void init() { - seller = User.of("user1", "password", "email1@", "oauthName1", null, null); - consumer = User.of("user2", "password", "email2@", "oauthName2", null, null); - other = User.of("user3", "password", "email3@", "oauthName3", null, null); + seller = User.of("user1", "password", "email1@", "oauthName1", null, "user1"); + consumer = User.of("user2", "password", "email2@", "oauthName2", null, "user2"); + other = User.of("user3", "password", "email3@", "oauthName3", null, "user3"); seller = userRepository.save(seller); consumer = userRepository.save(consumer); other = userRepository.save(other); diff --git a/api/src/test/java/mutsa/api/service/order/OrderServiceTest.java b/api/src/test/java/mutsa/api/service/order/OrderServiceTest.java index eca72c4..9f9bb97 100644 --- a/api/src/test/java/mutsa/api/service/order/OrderServiceTest.java +++ b/api/src/test/java/mutsa/api/service/order/OrderServiceTest.java @@ -57,8 +57,8 @@ class OrderServiceTest { @BeforeEach public void init() { - seller = User.of("user1", "password", "email1@", "oauthName1", null, null); - consumer = User.of("user2", "password", "email2@", "oauthName2", null, null); + seller = User.of("user1", "password", "email1@", "oauthName1", null, "user1"); + consumer = User.of("user2", "password", "email2@", "oauthName2", null, "user2"); seller = userRepository.save(seller); consumer = userRepository.save(consumer); diff --git a/api/src/test/java/mutsa/api/service/payment/PaymentModuleServiceTest.java b/api/src/test/java/mutsa/api/service/payment/PaymentModuleServiceTest.java index aa923c8..d67ea9c 100644 --- a/api/src/test/java/mutsa/api/service/payment/PaymentModuleServiceTest.java +++ b/api/src/test/java/mutsa/api/service/payment/PaymentModuleServiceTest.java @@ -84,7 +84,7 @@ private void initTestData() { } private User createAndSaveUser(String username, String email, String oauthName) { - User user = User.of(username, "password", email, oauthName, null, null); + User user = User.of(username, "password", email, oauthName, null, username); return userRepository.save(user); } diff --git a/api/src/test/java/mutsa/api/service/report/ReportModuleServiceTest.java b/api/src/test/java/mutsa/api/service/report/ReportModuleServiceTest.java index aa088dd..238832b 100644 --- a/api/src/test/java/mutsa/api/service/report/ReportModuleServiceTest.java +++ b/api/src/test/java/mutsa/api/service/report/ReportModuleServiceTest.java @@ -43,10 +43,10 @@ class ReportModuleServiceTest { @BeforeEach public void init() { - reporter = User.of("reporter", "password", "email_reporter", "oauthName", null, null); + reporter = User.of("reporter", "password", "email_reporter", "oauthName", null, "reporter"); reporter = userRepository.save(reporter); - reportedUser = User.of("reported", "password", "email_reported", "oauthName", null, null); + reportedUser = User.of("reported", "password", "email_reported", "oauthName", null, "reported"); reportedUser = userRepository.save(reportedUser); targetArticle = Article.builder().title("test article title") diff --git a/api/src/test/java/mutsa/api/service/report/ReportServiceTest.java b/api/src/test/java/mutsa/api/service/report/ReportServiceTest.java index 7b5fec9..d9099cc 100644 --- a/api/src/test/java/mutsa/api/service/report/ReportServiceTest.java +++ b/api/src/test/java/mutsa/api/service/report/ReportServiceTest.java @@ -46,10 +46,10 @@ public class ReportServiceTest { @BeforeEach public void init() { - reporter = User.of("reporter", "password", "email_reporter", "oauthName", null, null); + reporter = User.of("reporter", "password", "email_reporter", "oauthName", null, "reporter"); reporter = userRepository.save(reporter); - reportedUser = User.of("reported", "password", "email_reported", "oauthName", null, null); + reportedUser = User.of("reported", "password", "email_reported", "oauthName", null, "reported"); reportedUser = userRepository.save(reportedUser); targetArticle = Article.builder().title("test article title") diff --git a/api/src/test/java/mutsa/api/service/review/ReviewModuleServiceTest.java b/api/src/test/java/mutsa/api/service/review/ReviewModuleServiceTest.java index 6c689c1..e60a4cf 100644 --- a/api/src/test/java/mutsa/api/service/review/ReviewModuleServiceTest.java +++ b/api/src/test/java/mutsa/api/service/review/ReviewModuleServiceTest.java @@ -55,13 +55,13 @@ public class ReviewModuleServiceTest { @BeforeEach public void init() { - reviewer1 = User.of("user1", "password", "email1@", "oauthName1", null, null); + reviewer1 = User.of("user1", "password", "email1@", "oauthName1", null, "user1"); reviewer1 = userRepository.save(reviewer1); - reviewer2 = User.of("user2", "password", "email2@", "oauthName2", null, null); + reviewer2 = User.of("user2", "password", "email2@", "oauthName2", null, "user2"); reviewer2 = userRepository.save(reviewer2); - User seller = User.of("seller", "password", "sellerEmail@", "sellerOauthName", null, null); + User seller = User.of("seller", "password", "sellerEmail@", "sellerOauthName", null, "seller"); seller = userRepository.save(seller); article = Article.builder() diff --git a/api/src/test/java/mutsa/api/service/review/ReviewServiceTest.java b/api/src/test/java/mutsa/api/service/review/ReviewServiceTest.java index 7a629d2..356afd0 100644 --- a/api/src/test/java/mutsa/api/service/review/ReviewServiceTest.java +++ b/api/src/test/java/mutsa/api/service/review/ReviewServiceTest.java @@ -70,19 +70,19 @@ public static void afterAll() { @BeforeEach public void init() { - reviewer1 = User.of("user1", "password", "email1@", "oauthName1", "", null); + reviewer1 = User.of("user1", "password", "email1@", "oauthName1", "", "user1"); reviewer1 = userRepository.save(reviewer1); - reviewer2 = User.of("user2", "password", "email2@", "oauthName2", "", null); + reviewer2 = User.of("user2", "password", "email2@", "oauthName2", "", "user2"); reviewer2 = userRepository.save(reviewer2); - reviewer3 = User.of("user3", "password", "email3@", "oauthName3", "", null); + reviewer3 = User.of("user3", "password", "email3@", "oauthName3", "", "user3"); reviewer3 = userRepository.save(reviewer3); - reviewer4 = User.of("user4", "password", "email4@", "oauthName4", "", null); + reviewer4 = User.of("user4", "password", "email4@", "oauthName4", "", "user4"); reviewer4 = userRepository.save(reviewer4); - User seller = User.of("seller", "password", "sellerEmail@", "sellerOauthName", "", null); + User seller = User.of("seller", "password", "sellerEmail@", "sellerOauthName", "", "seller"); seller = userRepository.save(seller); article = Article.builder()