diff --git a/src/test/java/world/bentobox/bentobox/listeners/flags/protection/BreakBlocksListenerTest.java b/src/test/java/world/bentobox/bentobox/listeners/flags/protection/BreakBlocksListenerTest.java index 2183780ca..d503fefc9 100644 --- a/src/test/java/world/bentobox/bentobox/listeners/flags/protection/BreakBlocksListenerTest.java +++ b/src/test/java/world/bentobox/bentobox/listeners/flags/protection/BreakBlocksListenerTest.java @@ -621,4 +621,15 @@ public class BreakBlocksListenerTest extends AbstractCommonSetup { assertTrue(e.useInteractedBlock() == Result.ALLOW); } + + /** + * Test method for {@link world.bentobox.bentobox.listeners.flags.protection.BreakBlocksListener#onPlayerInteract(PlayerInteractEvent)} + */ + @Test + public void testNoClick() { + PlayerInteractEvent e = mock(PlayerInteractEvent.class); + when(e.getClickedBlock()).thenReturn(null); + bbl.onPlayerInteract(e); + verify(e).getClickedBlock(); + } }