public static void validState(boolean test, String message)
        throws IllegalStateException
    {
        if(!test)
        {
            throw new IllegalStateException(message);
        }
    }