SubLanguageModel { @Override public int hashCode() { return Objects.hash(intents, types); } protected  SubLanguageModel(List<Intent> intents, List<SlotType> types); @JsonProperty("intents") Collection<Intent> getIntents(); @JsonProperty("types") Collection<SlotType> getTypes(); @Override boolean equals(Object o); @Override int hashCode(); static Builder builder();  }
@Test public void testEqualsSelf() { SubLanguageModel test = mockBuilder("test").build(); assertEquals(test, test); assertEquals(test.hashCode(), test.hashCode()); }
@Test public void testNotEqualsDifferentIntent() { SubLanguageModel left = mockBuilder("test").build(); SubLanguageModel right = mockBuilder("test") .withIntentName("different") .build(); assertNotEquals(left, right); assertNotEquals(left.hashCode(), right.hashCode()); }
@Test public void testNotEqualsDifferentSlot() { SubLanguageModel left = mockBuilder("test").build(); SubLanguageModel right = mockBuilder("test") .withSlotName("different") .build(); assertNotEquals(left, right); assertNotEquals(left.hashCode(), right.hashCode()); }