AngularObject implements JsonSerializable { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AngularObject<?> that = (AngularObject<?>) o; return Objects.equals(name, that.name) && Objects.equals(noteId, that.noteId) && Objects.equals(paragraphId, that.paragraphId); } AngularObject();  AngularObject(String name, T o, String noteId, String paragraphId,
      AngularObjectListener listener); String getName(); void setNoteId(String noteId); String getNoteId(); String getParagraphId(); void setParagraphId(String paragraphId); boolean isGlobal(); @Override boolean equals(Object o); @Override int hashCode(); Object get(); void emit(); void set(T o); void set(T o, boolean emit); void setListener(AngularObjectListener listener); AngularObjectListener getListener(); void addWatcher(AngularObjectWatcher watcher); void removeWatcher(AngularObjectWatcher watcher); void clearAllWatchers(); @Override String toString(); String toJson(); static AngularObject fromJson(String json);  }
@Test public void testEquals() { assertEquals( new AngularObject("name", "value", "note1", null, null), new AngularObject("name", "value", "note1", null, null) ); assertEquals( new AngularObject("name", "value", "note1", "paragraph1", null), new AngularObject("name", "value", "note1", "paragraph1", null) ); assertEquals( new AngularObject("name", "value", null, null, null), new AngularObject("name", "value", null, null, null) ); assertEquals( new AngularObject("name", "value1", null, null, null), new AngularObject("name", "value2", null, null, null) ); assertNotSame( new AngularObject("name1", "value", null, null, null), new AngularObject("name2", "value", null, null, null) ); assertNotSame( new AngularObject("name1", "value", "note1", null, null), new AngularObject("name2", "value", "note2", null, null) ); assertNotSame( new AngularObject("name1", "value", "note", null, null), new AngularObject("name2", "value", null, null, null) ); assertNotSame( new AngularObject("name", "value", "note", "paragraph1", null), new AngularObject("name", "value", "note", "paragraph2", null) ); assertNotSame( new AngularObject("name", "value", "note1", null, null), new AngularObject("name", "value", "note1", "paragraph1", null) ); }