diff --git a/source/test-java/org/alfresco/repo/site/SiteServiceImplTest.java b/source/test-java/org/alfresco/repo/site/SiteServiceImplTest.java index ea7b2fd269..5818547044 100644 --- a/source/test-java/org/alfresco/repo/site/SiteServiceImplTest.java +++ b/source/test-java/org/alfresco/repo/site/SiteServiceImplTest.java @@ -2051,15 +2051,23 @@ public class SiteServiceImplTest extends BaseAlfrescoSpringTest // Set a membership with an illegal role. See ALF-619. // I'm checking that the exception type thrown is what it should be. + boolean failed = false; try { siteService.setMembership("testGroupMembership", groupThree, "rubbish"); } catch (UnknownAuthorityException expected) { - return null; + failed = true; + } + + authenticationComponent.setSystemUserAsCurrentUser(); + siteService.deleteSite("testGroupMembership"); + + if (!failed) + { + fail("Expected exception not thrown."); } - fail("Expected exception not thrown."); return null; }