From 8b474833e172bc1ed539db69e5b2d33562495687 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 25 Sep 2021 08:07:15 -0700 Subject: [PATCH] Fix IslandSethomeCommand test --- .../api/commands/island/IslandSethomeCommandTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/world/bentobox/bentobox/api/commands/island/IslandSethomeCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/island/IslandSethomeCommandTest.java index ad9062fbe..4f65286bd 100644 --- a/src/test/java/world/bentobox/bentobox/api/commands/island/IslandSethomeCommandTest.java +++ b/src/test/java/world/bentobox/bentobox/api/commands/island/IslandSethomeCommandTest.java @@ -62,6 +62,8 @@ public class IslandSethomeCommandTest { private Island island; @Mock private IslandWorldManager iwm; + @Mock + private WorldSettings ws; /** * @throws java.lang.Exception @@ -128,6 +130,8 @@ public class IslandSethomeCommandTest { // Number of homes default when(iwm.getMaxHomes(any())).thenReturn(3); when(plugin.getIWM()).thenReturn(iwm); + // World settings + when(iwm.getWorldSettings(any(World.class))).thenReturn(ws); // Number of homes PowerMockito.mockStatic(Util.class);