recursiveComparisonTest() { var simulation1 = Simulation.builder().name("John").cpf("9582728395") .email("
[email protected]").amount(new BigDecimal("500")).installments(1) .insurance(false).build(); var simulation2 = SimulationDto.builder().name("John").cpf("9582728395") .email("
[email protected]").amount(new BigDecimal("500")).installments(1) .insurance(false).build(); // ✅ won't fail because the assertion is done field by field assertThat(simulation1).usingRecursiveComparison().isEqualTo(simulation2); // ❌ will fail because equals compare references assertThat(simulation1).isEqualTo(simulation2); }