### Question:
CommandHelper { public static String getRawCommand(String chatMessage) { Preconditions.checkArgument(chatMessage.charAt(0) == '/', "getRawCommand('%s') requires a command, starting with a slash, to be passed!", chatMessage); String result; int spaceIndex = chatMessage.indexOf(" "); if (spaceIndex == -1) { result = chatMessage.substring(1); } else { result = chatMessage.substring(1, spaceIndex); } return result.toLowerCase(); } private  CommandHelper(); static String getRawCommand(String chatMessage); static String removeModPrefix(String commandName);  }### Answer:
@Test public void testGetRawCommand() { assertThat(CommandHelper.getRawCommand("/help"), is("help")); assertThat(CommandHelper.getRawCommand("/help test"), is("help")); assertThat(CommandHelper.getRawCommand("/minecraft:help"), is("minecraft:help")); assertThat(CommandHelper.getRawCommand("/minecraft:help test"), is("minecraft:help")); assertThat(CommandHelper.getRawCommand("/bukkit:help"), is("bukkit:help")); assertThat(CommandHelper.getRawCommand("/bukkit:help something multiple arguments wow"), is("bukkit:help")); }
@Test(expected = IllegalArgumentException.class) public void getRawCommand__startsWithSlash() { String chatMessage = " some mesage starting with a space and not a slash"; CommandHelper.getRawCommand(chatMessage); }