JsonNodeWrapper extends AbstractJsonNode implements IJsonNode { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (this == obj) return true; if (getClass() != obj.getClass()) return false; JsonNodeWrapper other = (JsonNodeWrapper) obj; if (this.value == null) { if (other.getValue() != null) return false; } else if (!this.value.equals(other.getValue())) return false; return true; } JsonNodeWrapper();  JsonNodeWrapper(final IJsonNode value); @Override void read(final DataInput in); @Override void write(final DataOutput out); IJsonNode getValue(); @SuppressWarnings({ "unchecked", "unused" }) T getValue( final Class<T> klass); void setValue(final IJsonNode value); @Override int compareToSameType(final IJsonNode other); @Override Object getJavaValue(); @Override int hashCode(); @Override boolean equals(Object obj); @Override Type getType(); @Override StringBuilder toString(final StringBuilder sb); @Override boolean isNull(); @Override void copyValueFrom(final IJsonNode otherNode); @Override boolean isMissing(); @Override boolean isObject(); @Override boolean isArray(); @Override boolean isTextual(); @Override void clear(); @Override int getMaxNormalizedKeyLen(); @Override void copyNormalizedKey(final byte[] target, final int offset, final int len);  }
@Test public void shouldNotEqualWithNonWrapperNodes() { Assert.assertFalse(this.node.equals(IntNode.valueOf(42))); }
@Test public void shouldNotEqualWithNull() { Assert.assertFalse(this.node.equals(null)); }
@Test public void shouldEqualWithNullIfValueIsNull() { this.node = new JsonNodeWrapper(null); Assert.assertTrue(this.node.equals(new JsonNodeWrapper(null))); }