diff --git a/src/test/java/world/bentobox/bentobox/api/commands/admin/purge/AdminPurgeCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/admin/purge/AdminPurgeCommandTest.java index 1748e6b87..c1db3943c 100644 --- a/src/test/java/world/bentobox/bentobox/api/commands/admin/purge/AdminPurgeCommandTest.java +++ b/src/test/java/world/bentobox/bentobox/api/commands/admin/purge/AdminPurgeCommandTest.java @@ -1,6 +1,3 @@ -/** - * - */ package world.bentobox.bentobox.api.commands.admin.purge; import static org.junit.Assert.assertEquals; @@ -91,11 +88,13 @@ public class AdminPurgeCommandTest { when(im.getIslands()).thenReturn(Collections.emptyList()); // IWM - IslandWorldManager iwm = mock(IslandWorldManager.class); when(iwm.getFriendlyName(any())).thenReturn("BSkyBlock"); when(plugin.getIWM()).thenReturn(iwm); + // Island + when(island.isOwned()).thenReturn(true); // Default owned + // Command apc = new AdminPurgeCommand(ac); } @@ -206,6 +205,8 @@ public class AdminPurgeCommandTest { when(island.getPurgeProtected()).thenReturn(false); when(island.getWorld()).thenReturn(world); when(island.getOwner()).thenReturn(null); + when(island.isUnowned()).thenReturn(true); + when(island.isOwned()).thenReturn(false); when(im.getIslands()).thenReturn(Collections.singleton(island)); assertTrue(apc.execute(user, "protect", Collections.singletonList("10"))); verify(user).sendMessage(eq("commands.admin.purge.purgable-islands"), eq("[number]"), eq("0")); @@ -256,6 +257,7 @@ public class AdminPurgeCommandTest { when(island.getPurgeProtected()).thenReturn(false); when(island.getWorld()).thenReturn(world); when(island.getOwner()).thenReturn(UUID.randomUUID()); + when(island.isOwned()).thenReturn(true); Map team = new HashMap<>(); team.put(UUID.randomUUID(), RanksManager.OWNER_RANK); when(island.getMembers()).thenReturn(team);