@Test
public void testEquals() {

    SubModel left = SubModel.builder()
        .withLanguageModel(SubLanguageModel.builder()
            .withIntents(Collections.singletonList(
                Intent.builder()
                    .withName("test")
                    .withSamples(Collections.singletonList("test"))
                    .withSlots(Collections.singletonList(
                        Slot.builder()
                            .withName("test")
                            .withType("test")
                            .build()
                    ))
                    .build()
            ))
            .build())
        .withDialog(Dialog.builder()
            .withIntents(Collections.singletonList(
                DialogIntent.builder()
                    .withName("test")
                    .withConfirmationRequired(true)
                    .withPrompts(DialogIntentPrompt.builder()
                        .withConfirmation("test")
                        .build())
                    .withSlots(Collections.singletonList(
                        DialogSlot.builder()
                            .withName("test")
                            .withType("test")
                            .withConfirmationRequired(true)
                            .withElicitationRequired(true)
                            .withPrompts(DialogSlotPrompt.builder()
                                .withConfirmation("testConfirm")
                                .withElicitation("testElicit")
                                .build())
                            .build()
                    ))
                    .build()
            ))
            .build())
        .addPrompts(Collections.singletonList(
            Prompt.builder()
                .withId("test")
                .withVariations(Collections.singletonList(
                    PromptVariation.builder()
                        .withType("PlainText")
                        .withValue("test")
                        .build()
                ))
                .build()
        ))
        .build();
    SubModel right = SubModel.builder()
        .withLanguageModel(SubLanguageModel.builder()
            .withIntents(Collections.singletonList(
                Intent.builder()
                    .withName("test")
                    .withSamples(Collections.singletonList("test"))
                    .withSlots(Collections.singletonList(
                        Slot.builder()
                            .withName("test")
                            .withType("test")
                            .build()
                    ))
                    .build()
            ))
            .build())
        .withDialog(Dialog.builder()
            .withIntents(Collections.singletonList(
                DialogIntent.builder()
                    .withName("test")
                    .withConfirmationRequired(true)
                    .withPrompts(DialogIntentPrompt.builder()
                        .withConfirmation("test")
                        .build())
                    .withSlots(Collections.singletonList(
                        DialogSlot.builder()
                            .withName("test")
                            .withType("test")
                            .withConfirmationRequired(true)
                            .withElicitationRequired(true)
                            .withPrompts(DialogSlotPrompt.builder()
                                .withConfirmation("testConfirm")
                                .withElicitation("testElicit")
                                .build())
                            .build()
                    ))
                    .build()
            ))
            .build())
        .addPrompts(Collections.singletonList(
            Prompt.builder()
                .withId("test")
                .withVariations(Collections.singletonList(
                    PromptVariation.builder()
                        .withType("PlainText")
                        .withValue("test")
                        .build()
                ))
                .build()
        ))
        .build();
    assertEquals(left, right);
    assertEquals(left.hashCode(), right.hashCode());
}