@VisibleForTesting
	static CompostState determineCompostUsed(String chatMessage)
	{
		if (!chatMessage.contains("compost"))
		{
			return null;
		}

		Matcher matcher;
		if ((matcher = COMPOST_USED_ON_PATCH.matcher(chatMessage)).matches() ||
			(matcher = FERTILE_SOIL_CAST.matcher(chatMessage)).find() ||
			(matcher = ALREADY_TREATED.matcher(chatMessage)).matches() ||
			(matcher = INSPECT_PATCH.matcher(chatMessage)).matches())
		{
			String compostGroup = matcher.group("compostType");
			switch (compostGroup)
			{
				case "ultra":
					return CompostState.ULTRACOMPOST;
				case "super":
					return CompostState.SUPERCOMPOST;
				default:
					return CompostState.COMPOST;
			}
		}

		return null;
	}
@Test
	public void determineCompostUsed_returnsAppropriateCompostValues()
	{
		// invalid
		collector.checkThat(
			CompostTracker.determineCompostUsed("This is not a farming chat message."),
			is((CompostState) null)
		);
		collector.checkThat(
			CompostTracker.determineCompostUsed("Contains word compost but is not examine message."),
			is((CompostState) null)
		);

		// inspect
		collector.checkThat(
			CompostTracker.determineCompostUsed("This is an allotment. The soil has been treated with supercompost. The patch is empty and weeded."),
			is(CompostState.SUPERCOMPOST)
		);

		// fertile soil on existing patch
		collector.checkThat(
			CompostTracker.determineCompostUsed("This patch has already been fertilised with ultracompost - the spell can't make it any more fertile."),
			is(CompostState.ULTRACOMPOST)
		);
		// fertile soil on cleared patch
		collector.checkThat(
			CompostTracker.determineCompostUsed("The herb patch has been treated with supercompost."),
			is(CompostState.SUPERCOMPOST)
		);

		// bucket on cleared patch
		collector.checkThat(
			CompostTracker.determineCompostUsed("You treat the herb patch with ultracompost."),
			is(CompostState.ULTRACOMPOST)
		);
		collector.checkThat(
			CompostTracker.determineCompostUsed("You treat the tree patch with compost."),
			is(CompostState.COMPOST)
		);
		collector.checkThat(
			CompostTracker.determineCompostUsed("You treat the fruit tree patch with supercompost."),
			is(CompostState.SUPERCOMPOST)
		);
	}