'Assert that if one of the given field names is set on a ``NodeState``,
all of them must be set or this will be consideted an invariant
violation.
:param fields: ``NodeState`` attributes that are all expected to
be settable as a group, but which cannot be missing if one of
the others is set.'

def assert_required_field_set(self, **fields):

    NodeState(hostname=u'127.0.0.1', uuid=uuid4(), **fields)
    for name in fields:
        remaining_fields = fields.copy()
        del remaining_fields[name]
        self.assertRaises(InvariantException, NodeState, hostname=u'127.0.0.1', uuid=uuid4(), **remaining_fields)
