11package world .bentobox .aoneblock .listeners ;
22
3+ import static org .junit .jupiter .api .Assertions .assertDoesNotThrow ;
34import static org .junit .jupiter .api .Assertions .assertFalse ;
45import static org .junit .jupiter .api .Assertions .assertTrue ;
56import static org .mockito .ArgumentMatchers .any ;
8182 *
8283 * @author tastybento
8384 */
84- public class BlockListenerTest2 extends CommonTestSetup {
85+ class BlockListenerTest2 extends CommonTestSetup {
8586
8687 // Class under test
8788 private BlockListener bl ;
@@ -291,7 +292,7 @@ void testOnPlayerInteractNullBlock() {
291292 PlayerInteractEvent e = makeInteractEvent (Action .RIGHT_CLICK_BLOCK , null , EquipmentSlot .HAND );
292293
293294 // Should not throw NPE
294- bl .onPlayerInteract (e );
295+ assertDoesNotThrow (() -> bl .onPlayerInteract (e ) );
295296 }
296297
297298 /**
@@ -819,7 +820,7 @@ void testOnDeletedIslandInWorld() {
819820 mock (world .bentobox .bentobox .api .events .island .IslandDeleteEvent .class );
820821 when (e .getIsland ()).thenReturn (toDelete );
821822
822- bl .onDeletedIsland (e );
823+ assertDoesNotThrow (() -> bl .onDeletedIsland (e ) );
823824
824825 // Confirm the method completes without exception (cache and DB deletion happened)
825826 }
@@ -840,7 +841,7 @@ void testOnDeletedIslandNotInWorld() {
840841 mock (world .bentobox .bentobox .api .events .island .IslandDeleteEvent .class );
841842 when (e .getIsland ()).thenReturn (toDelete );
842843
843- bl .onDeletedIsland (e );
844+ assertDoesNotThrow (() -> bl .onDeletedIsland (e ) );
844845 // No exception; nothing to verify beyond the early return
845846 }
846847
0 commit comments