@Subscribe
	public void onMenuOptionClicked(MenuOptionClicked e)
	{
		if (!isCompostAction(e))
		{
			return;
		}

		ObjectComposition patchDef = client.getObjectDefinition(e.getId());
		WorldPoint actionLocation = WorldPoint.fromScene(client, e.getParam0(), e.getParam1(), client.getPlane());
		FarmingPatch targetPatch = farmingWorld.getRegionsForLocation(actionLocation)
			.stream()
			.flatMap(fr -> Arrays.stream(fr.getPatches()))
			.filter(fp -> fp.getVarbit() == patchDef.getVarbitId())
			.filter(fp -> fp.getImplementation() != PatchImplementation.COMPOST && fp.getImplementation() != PatchImplementation.BIG_COMPOST)
			.findFirst()
			.orElse(null);
		if (targetPatch == null)
		{
			return;
		}

		log.debug("Storing pending compost action for patch [{}]", targetPatch);
		PendingCompost pc = new PendingCompost(
			Instant.now().plus(COMPOST_ACTION_TIMEOUT),
			actionLocation,
			targetPatch
		);
		pendingCompostActions.put(targetPatch, pc);
	}
@Test
	public void onMenuOptionClicked_queuesPendingCompostForFertileSoilSpellActions()
	{
		Widget widget = mock(Widget.class);
		when(client.getSelectedWidget()).thenReturn(widget);
		when(widget.getId()).thenReturn(ComponentID.SPELLBOOK_FERTILE_SOIL);

		MenuOptionClicked inspectPatchAction = mock(MenuOptionClicked.class);
		when(inspectPatchAction.getMenuAction()).thenReturn(MenuAction.WIDGET_TARGET_ON_GAME_OBJECT);
		when(inspectPatchAction.getId()).thenReturn(PATCH_ID);
		when(inspectPatchAction.getParam0()).thenReturn(1);
		when(inspectPatchAction.getParam1()).thenReturn(2);

		compostTracker.onMenuOptionClicked(inspectPatchAction);
		CompostTracker.PendingCompost actual = compostTracker.pendingCompostActions.get(farmingPatch);

		assertThat(actual.getFarmingPatch(), is(farmingPatch));
		assertThat(actual.getPatchLocation(), is(new WorldPoint(1, 2, 0)));
	}