{
public static <C extends Command> void assertCommandForClient(final List<CommandForClient> commandsForClients, final int index, final String expectedRegisteredClientName, final Class<C> expectedCommandClass)
{
final CommandForClient commandForClient = commandsForClients.get(index);
assertEquals(expectedRegisteredClientName, commandForClient.getClientName());
final Command command = commandForClient.getCommand();
assertTrue("Command " + index + " is of class " + command.getClass() + " but expecting " + expectedCommandClass,
expectedCommandClass.isAssignableFrom(command.getClass()));
}