POSSample { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (obj instanceof POSSample) { POSSample a = (POSSample) obj; return Arrays.equals(getSentence(), a.getSentence()) && Arrays.equals(getTags(), a.getTags()); } else { return false; } } POSSample(String sentence[], String tags[]);  POSSample(List<String> sentence, List<String> tags);  POSSample(List<String> sentence, List<String> tags,
      String[][] additionalContext);  POSSample(String sentence[], String tags[],
      String[][] additionalContext); String[] getSentence(); String[] getTags(); String[][] getAddictionalContext(); @Override String toString(); static POSSample parse(String sentenceString); @Override boolean equals(Object obj);  }
@Test public void testEquals() throws InvalidFormatException { assertFalse(createGoldSample() == createGoldSample()); assertTrue(createGoldSample().equals(createGoldSample())); assertFalse(createPredSample().equals(createGoldSample())); assertFalse(createPredSample().equals(new Object())); }