diff --git a/jargon-core/src/test/java/org/irods/jargon/core/pub/UserGroupAOImplTest.java b/jargon-core/src/test/java/org/irods/jargon/core/pub/UserGroupAOImplTest.java index fa98e0e52..4a5b621e3 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/pub/UserGroupAOImplTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/pub/UserGroupAOImplTest.java @@ -11,6 +11,7 @@ import org.irods.jargon.core.exception.DuplicateDataException; import org.irods.jargon.core.exception.InvalidGroupException; import org.irods.jargon.core.exception.InvalidUserException; +import org.irods.jargon.core.exception.JargonException; import org.irods.jargon.core.protovalues.UserTypeEnum; import org.irods.jargon.core.pub.domain.User; import org.irods.jargon.core.pub.domain.UserGroup; @@ -765,8 +766,16 @@ public final void testRemoveUserFromGroupUserNotInGroup() throws Exception { userGroupAO.removeUserGroup(userGroup); userGroupAO.addUserGroup(userGroup); - userGroupAO.removeUserFromGroup(testUserGroup, - testingProperties.getProperty(TestingPropertiesHelper.IRODS_SECONDARY_USER_KEY), null); + if (accessObjectFactory.getIRODSServerProperties(irodsAccount).isAtLeastIrods432()) { + JargonException thrown = Assert.assertThrows(JargonException.class, + () -> userGroupAO.removeUserFromGroup(testUserGroup, + testingProperties.getProperty(TestingPropertiesHelper.IRODS_SECONDARY_USER_KEY), null)); + Assert.assertEquals(thrown.getUnderlyingIRODSExceptionCode(), -1830000); // USER_NOT_IN_GROUP + } + else { + userGroupAO.removeUserFromGroup(testUserGroup, + testingProperties.getProperty(TestingPropertiesHelper.IRODS_SECONDARY_USER_KEY), null); + } } /**