package com.tinkerpop.blueprints.util.micro;

import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.Property;
import com.tinkerpop.blueprints.util.ElementHelper;

import java.util.Map;

/**
 * @author Marko A. Rodriguez (http://markorodriguez.com)
 */
public abstract class MicroElement implements Element {

    final Object id;
    final String label;

    public MicroElement(final Element element) {
        this.id = element.getId();
        this.label = element.getLabel();
    }

    public Object getId() {
        return this.id;
    }

    public String getLabel() {
        return this.label;
    }

    public void setProperty(final String key, final Object value) {
        throw new UnsupportedOperationException();
    }

    public <V> Property<V> getProperty(final String key) {
        throw new UnsupportedOperationException();
    }

    public Map<String, Property> getProperties() {
        throw new UnsupportedOperationException();
    }

    public void remove() {
        throw new UnsupportedOperationException();
    }

    public int hashCode() {
        return this.id.hashCode();
    }

    public boolean equals(final Object object) {
        return ElementHelper.areEqual(this, object);
    }
}

@@ -196,16 +196,42 @@
 til.Map;
+%0Aimport java.util.Objects;
 %0A%0A/**%0A *
@@ -438,24 +438,65 @@
  element) %7B%0A
+        Objects.requireNonNull(element);%0A
         this

Check non null for element in MicroElement.