NameSample { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (obj instanceof NameSample) { NameSample a = (NameSample) obj; return Arrays.equals(getSentence(), a.getSentence()) && Arrays.equals(getNames(), a.getNames()) && Arrays.equals(getAdditionalContext(), a.getAdditionalContext()) && isClearAdaptiveDataSet() == a.isClearAdaptiveDataSet(); } else { return false; } } NameSample(String[] sentence, Span[] names,
      String[][] additionalContext, boolean clearAdaptiveData);  NameSample(String[] sentence, Span[] names, boolean clearAdaptiveData); String[] getSentence(); Span[] getNames(); String[][] getAdditionalContext(); boolean isClearAdaptiveDataSet(); @Override boolean equals(Object obj); @Override String toString(); static NameSample parse(String taggedTokens,
      boolean isClearAdaptiveData); static NameSample parse(String taggedTokens, String defaultType,
      boolean isClearAdaptiveData); static final String DEFAULT_TYPE; }
@Test public void testEquals() { assertFalse(createGoldSample() == createGoldSample()); assertTrue(createGoldSample().equals(createGoldSample())); assertFalse(createGoldSample().equals(createPredSample())); assertFalse(createPredSample().equals(new Object())); }