':type target_name: str
:type throw: bool
:rtype: bool'

def validate(self, target_name, throw):

    current = EnvironmentDescription(self.args)
    original_json = str(self)
    current_json = str(current)
    if (original_json == current_json):
        return True
    message = ('Test    target    "%s"    has    changed    the    test    environment!\nIf    these    changes    are    necessary,    they    must    be    reverted    before    the    test    finishes.\n>>>    Original    Environment\n%s\n>>>    Current    Environment\n%s' % (target_name, original_json, current_json))
    if throw:
        raise ApplicationError(message)
    display.error(message)
    return False
