SubModel { public static Builder builder() { return new Builder(); } SubModel(SubLanguageModel languageModel, Dialog dialog, List<Prompt> prompts); @JsonProperty("languageModel") SubLanguageModel getLanguageModel(); @JsonProperty("dialog") Dialog getDialog(); @JsonProperty("prompts") List<Prompt> getPrompts(); @Override boolean equals(Object o); @Override int hashCode(); static Builder builder();  }
@Test(expected = IllegalArgumentException.class) public void testNullLanguageModel() { SubModel.builder().withLanguageModel(null).build(); }
@Test public void testNotEqualsNull() { SubModel model = SubModel.builder() .withLanguageModel(SubLanguageModel.builder() .build()) .build(); assertNotEquals(model, null); }
@Test public void testNotEqualsWrongClass() { SubModel model = SubModel.builder() .withLanguageModel(SubLanguageModel.builder() .build()) .build(); assertNotEquals(model, "wrong class"); }