TrackerBuilder { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TrackerBuilder that = (TrackerBuilder) o; return mSiteId == that.mSiteId && mApiUrl.equals(that.mApiUrl) && mTrackerName.equals(that.mTrackerName); } TrackerBuilder(String apiUrl, int siteId, String trackerName); static TrackerBuilder createDefault(String apiUrl, int siteId); String getApiUrl(); int getSiteId(); TrackerBuilder setTrackerName(String name); String getTrackerName(); TrackerBuilder setApplicationBaseUrl(String domain); String getApplicationBaseUrl(); Tracker build(Matomo matomo); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testEquals() { TrackerBuilder trackerBuilder1 = new TrackerBuilder(mTestUrl, 1337, "a"); TrackerBuilder trackerBuilder2 = new TrackerBuilder(mTestUrl, 1337, "a"); TrackerBuilder trackerBuilder3 = new TrackerBuilder(mTestUrl, 1336, "b"); assertThat(trackerBuilder1, is(trackerBuilder2)); assertThat(trackerBuilder1, is(not(trackerBuilder3))); }