From 728ac08ce6d1d1c4e7caa288285c7ed922d3c694 Mon Sep 17 00:00:00 2001 From: rushtong Date: Wed, 10 Jan 2024 09:00:41 -0500 Subject: [PATCH] test fix --- .../http/resources/SamResourceTest.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/java/org/broadinstitute/consent/http/resources/SamResourceTest.java b/src/test/java/org/broadinstitute/consent/http/resources/SamResourceTest.java index 69e0d9c039..f7f31217b4 100644 --- a/src/test/java/org/broadinstitute/consent/http/resources/SamResourceTest.java +++ b/src/test/java/org/broadinstitute/consent/http/resources/SamResourceTest.java @@ -55,7 +55,7 @@ private void initResource() { } @Test - public void testGetResourceTypes() throws Exception { + void testGetResourceTypes() throws Exception { ActionPattern pattern = new ActionPattern() .setAuthDomainConstrainable(true) .setDescription("description") @@ -79,7 +79,7 @@ public void testGetResourceTypes() throws Exception { } @Test - public void testPostRegistrationInfo() throws Exception { + void testPostRegistrationInfo() throws Exception { UserStatus.UserInfo info = new UserStatus.UserInfo().setUserEmail("test@test.org") .setUserSubjectId("subjectId"); UserStatus.Enabled enabled = new UserStatus.Enabled().setAllUsersGroup(true).setGoogle(true) @@ -92,7 +92,7 @@ public void testPostRegistrationInfo() throws Exception { } @Test - public void testGetSelfDiagnostics() throws Exception { + void testGetSelfDiagnostics() throws Exception { UserStatusDiagnostics diagnostics = new UserStatusDiagnostics() .setAdminEnabled(RandomUtils.nextBoolean()) .setEnabled(RandomUtils.nextBoolean()) @@ -106,7 +106,7 @@ public void testGetSelfDiagnostics() throws Exception { } @Test - public void testGetRegistrationInfo() throws Exception { + void testGetRegistrationInfo() throws Exception { UserStatusInfo userInfo = new UserStatusInfo() .setAdminEnabled(RandomUtils.nextBoolean()) .setUserEmail("test@test.org") @@ -119,7 +119,7 @@ public void testGetRegistrationInfo() throws Exception { } @Test - public void testPostSelfTos() throws Exception { + void testPostSelfTos() throws Exception { when(samService.postTosAcceptedStatus(any())).thenReturn(200); initResource(); Response response = resource.postSelfTos(authUser); @@ -127,7 +127,7 @@ public void testPostSelfTos() throws Exception { } @Test - public void testPostSelfTos_NoConsentUser() throws Exception { + void testPostSelfTos_NoConsentUser() throws Exception { doThrow(new NotFoundException()).when(userService).findUserByEmail(any()); when(samService.postTosAcceptedStatus(any())).thenReturn(200); initResource(); @@ -138,9 +138,9 @@ public void testPostSelfTos_NoConsentUser() throws Exception { } @Test - public void testPostSelfTos_ExistingSamUser() throws Exception { + void testPostSelfTos_ExistingSamUser() throws Exception { doThrow(new ConsentConflictException()).when(samService).postRegistrationInfo(any()); - when(samService.postTosAcceptedStatus(any())).thenReturn(409); + when(samService.postTosAcceptedStatus(any())).thenReturn(200); initResource(); Response response = resource.postSelfTos(authUser); @@ -148,7 +148,7 @@ public void testPostSelfTos_ExistingSamUser() throws Exception { } @Test - public void testRemoveSelfTos() throws Exception { + void testRemoveSelfTos() throws Exception { when(samService.removeTosAcceptedStatus(any())).thenReturn(200); initResource(); Response response = resource.removeTos(authUser);