Best Assertj code snippet using org.assertj.core.api.RecursiveComparisonAssert.isEqualTo
Source:RecursiveComparisonAssert_isEqualTo_BaseTest.java
...18import org.assertj.core.api.recursive.comparison.ComparisonDifference;19import org.assertj.core.api.recursive.comparison.RecursiveComparisonConfiguration;20import org.assertj.core.internal.ObjectsBaseTest;21import org.junit.jupiter.api.BeforeEach;22public class RecursiveComparisonAssert_isEqualTo_BaseTest extends ObjectsBaseTest {23 public static WritableAssertionInfo info;24 public RecursiveComparisonConfiguration recursiveComparisonConfiguration;25 @BeforeEach26 public void setup() {27 recursiveComparisonConfiguration = new RecursiveComparisonConfiguration();28 }29 public void verifyShouldBeEqualByComparingFieldByFieldRecursivelyCall(Object actual, Object expected,30 ComparisonDifference... differences) {31 verify(failures).failure(info, shouldBeEqualByComparingFieldByFieldRecursively(actual,32 expected,33 list(differences),34 recursiveComparisonConfiguration,35 info.representation()));36 }37 public AssertionError compareRecursivelyFailsAsExpected(Object actual, Object expected) {38 RecursiveComparisonAssert<?> recursiveComparisonAssert = new RecursiveComparisonAssert<>(actual,39 recursiveComparisonConfiguration);40 info = recursiveComparisonAssert.info;41 recursiveComparisonAssert.objects = objects;42 return expectAssertionError(() -> recursiveComparisonAssert.isEqualTo(expected));43 }44 public static ComparisonDifference diff(String path, Object actual, Object other) {45 return new ComparisonDifference(list(path), actual, other);46 }47 public static ComparisonDifference diff(String path, Object actual, Object other, String additionalInformation) {48 return new ComparisonDifference(list(path), actual, other, additionalInformation);49 }50}...
Source:TestMatcher.java
...24 .usingRecursiveComparison();25 if (!usingEquals) {26 recursiveComparison = recursiveComparison.ignoringFields(fieldsToIgnore);27 }28 recursiveComparison.isEqualTo(expected);29 }30 @SafeVarargs31 public final void assertMatch(Iterable<T> actual, T... expected) {32 assertMatch(actual, List.of(expected));33 }34 public void assertMatch(Iterable<T> actual, Iterable<T> expected) {35 RecursiveComparisonAssert<?> recursiveComparison = assertThat(actual)36 .usingRecursiveComparison();37 if (!usingEquals) {38 recursiveComparison = recursiveComparison.ignoringFields(fieldsToIgnore);39 }40 recursiveComparison.isEqualTo(expected);41 }42 public ResultMatcher contentJson(T expected) {43 return result -> assertMatch(readListFromJsonMvcResult(result, clazz), expected);44 }45 public ResultMatcher contentJson(T... expected) {46 return contentJson(List.of(expected));47 }48 public ResultMatcher contentJson(Iterable<T> expected) {49 return result -> assertMatch(readListFromJsonMvcResult(result, clazz), expected);50 }51}...
isEqualTo
Using AI Code Generation
1import org.assertj.core.api.RecursiveComparisonAssert;2import org.assertj.core.api.RecursiveComparisonConfiguration;3public class Test {4 public static void main(String[] args) {5 RecursiveComparisonConfiguration recursiveComparisonConfiguration = new RecursiveComparisonConfiguration();6 recursiveComparisonConfiguration.ignoreAllActualNullFields();7 RecursiveComparisonAssert recursiveComparisonAssert = new RecursiveComparisonAssert(new Test().new ClassA());8 recursiveComparisonAssert.isEqualTo(new Test().new ClassB(), recursiveComparisonConfiguration);9 }10 class ClassA {11 String name;12 String address;13 int age;14 }15 class ClassB {16 String name;17 String address;18 int age;19 }20}21import org.assertj.core.api.AbstractObjectAssert;22public class Test {23 public static void main(String[] args) {24 AbstractObjectAssert abstractObjectAssert = new AbstractObjectAssert(new Test().new ClassA(), AbstractObjectAssert.class) {25 };26 abstractObjectAssert.isEqualToIgnoringNullFields(new Test().new ClassB());27 }28 class ClassA {29 String name;30 String address;31 int age;32 }33 class ClassB {34 String name;35 String address;36 int age;37 }38}
isEqualTo
Using AI Code Generation
1import static org.assertj.core.api.Assertions.*;2import org.assertj.core.api.RecursiveComparisonAssert;3import org.assertj.core.api.RecursiveComparisonConfiguration;4import org.assertj.core.api.RecursiveComparisonConfigurationBuilder;5import org.assertj.core.internal.objects.data.Address;6import org.assertj.core.internal.objects.data.Person;7import org.assertj.core.internal.objects.data.PersonWithAddress;8import org.assertj.core.internal.objects.data.PersonWithDifferentAddress;9import org.assertj.core.internal.objects.data.PersonWithSameAddress;10import org.junit.Test;11public class RecursiveComparisonAssertTest {12 public void testRecursiveComparisonAssert() {13 Person expected = new Person("John", 30);14 Person actual = new Person("John", 30);15 assertThat(actual).usingRecursiveComparison().isEqualTo(expected);16 }17}18 <Person(name=John, age=30)>19 <Person(name=John, age=30)>20import static org.assertj.core.api.Assertions.*;21import org.assertj.core.api.RecursiveComparisonAssert;22import org.assertj.core.api.RecursiveComparisonConfiguration;23import org.assertj.core.api.RecursiveComparisonConfigurationBuilder;24import org.assertj.core.internal.objects.data.Address;25import org.assertj.core.internal.objects.data.Person;26import org.assertj.core.internal.objects.data.PersonWithAddress;27import org.assertj.core.internal.objects.data.PersonWithDifferentAddress;28import org.assertj.core.internal.objects.data.PersonWithSameAddress;29import org.junit.Test;30public class RecursiveComparisonAssertTest {31 public void testRecursiveComparisonAssert() {32 Person expected = new Person("John", 30);33 Person actual = new Person("John", 30);34 RecursiveComparisonConfiguration configuration = new RecursiveComparisonConfigurationBuilder()35 .withIgnoredFields("name").build();36 assertThat(actual).usingRecursiveComparison(configuration).isEqualTo(expected);37 }38}39 <Person(name=John, age=30)>
isEqualTo
Using AI Code Generation
1import org.assertj.core.api.RecursiveComparisonAssert;2import org.assertj.core.api.RecursiveComparisonConfiguration;3import org.assertj.core.api.Assertions;4import org.assertj.core.api.RecursiveComparisonConfigurationBuilder;5import org.assertj.core.util.introspection.IntrospectionError;6import org.junit.Test;7import java.util.List;8import java.util.ArrayList;9import static org.assertj.core.api.Assertions.assertThat;10import static org.assertj.core.api.Assertions.assertThatThrownBy;11public class AssertJTest {12 public void test() {13 List<String> list1 = new ArrayList<>();14 list1.add("one");15 list1.add("two");16 List<String> list2 = new ArrayList<>();17 list2.add("one");18 list2.add("two");19 assertThat(list1).isEqualTo(list2);20 }21}22at org.assertj.core.api.AbstractAssert.isEqualTo(AbstractAssert.java:82)23at org.assertj.core.api.AssertionsForClassTypes.isEqualTo(AssertionsForClassTypes.java:83)24at org.assertj.core.api.Assertions.isEqualTo(Assertions.java:1096)25at AssertJTest.test(AssertJTest.java:18)
isEqualTo
Using AI Code Generation
1package com.automationrhapsody.junit5;2import static org.assertj.core.api.Assertions.assertThat;3import java.util.ArrayList;4import java.util.List;5import org.junit.jupiter.api.Test;6public class AssertJRecursiveComparisonTest {7 public void testRecursiveComparison() {8 List<Child> children = new ArrayList<>();9 children.add(new Child("John", 5));10 children.add(new Child("Mary", 3));11 Parent parent = new Parent("Doe", children);12 List<Child> expectedChildren = new ArrayList<>();13 expectedChildren.add(new Child("John", 5));14 expectedChildren.add(new Child("Mary", 3));15 Parent expectedParent = new Parent("Doe", expectedChildren);16 assertThat(parent).isEqualTo(expectedParent);17 }18}19package com.automationrhapsody.junit5;20import java.util.List;21public class Parent {22 private String name;23 private List<Child> children;24 public Parent(String name, List<Child> children) {25 this.name = name;26 this.children = children;27 }28 public String getName() {29 return name;30 }31 public List<Child> getChildren() {32 return children;33 }34}35package com.automationrhapsody.junit5;36public class Child {37 private String name;38 private int age;39 public Child(String name, int age) {40 this.name = name;41 this.age = age;42 }43 public String getName() {44 return name;45 }46 public int getAge() {47 return age;48 }49}50package com.automationrhapsody.junit5;51import static org.assertj.core.api.Assertions.assertThat;52import org.junit.jupiter.api.Test;53public class AssertJRecursiveComparisonTest {54 public void testRecursiveComparison() {55 Person person = new Person("John", 35, "London");56 Person expectedPerson = new Person("John", 35, "London");57 assertThat(person).isEqualTo(expectedPerson);58 }59}
isEqualTo
Using AI Code Generation
1import org.assertj.core.api.RecursiveComparisonAssert;2import org.assertj.core.api.RecursiveComparisonConfiguration;3import org.assertj.core.api.RecursiveComparisonConfigurationBuilder;4import org.assertj.core.api.RecursiveComparisonConfigurationBuilder.RecursiveComparisonConfigurationBuilderCustomizer;5import org.assertj.core.api.RecursiveComparisonConfigurationBuilder.RecursiveComparisonConfigurationBuilderCustomizer.RecursiveComparisonConfigurationBuilderCustomizerCustomizer;6import org.assertj.core.internal.Objects;7import org.assertj.core.util.introspection.IntrospectionError;8import org.assertj.core.util.introspection.PropertyOrFieldSupport;9public class RecursiveComparisonAssertTest {10 public static void main(String[] args) {11 RecursiveComparisonConfigurationBuilderCustomizer customizer = new RecursiveComparisonConfigurationBuilderCustomizerCustomizer();12 RecursiveComparisonConfigurationBuilder configurationBuilder = new RecursiveComparisonConfigurationBuilder(customizer);13 RecursiveComparisonConfiguration configuration = configurationBuilder.build();14 RecursiveComparisonAssert<RecursiveComparisonAssertTest> recursiveComparisonAssert = new RecursiveComparisonAssert<>(new RecursiveComparisonAssertTest(), configuration);15 recursiveComparisonAssert.isEqualTo(new RecursiveComparisonAssertTest());16 }17}18import org.assertj.core.api.AbstractAssert;19import org.assertj.core.api.RecursiveComparisonConfiguration;20import org.assertj.core.api.RecursiveComparisonAssert;21public class RecursiveComparisonAssertTest extends AbstractAssert<RecursiveComparisonAssertTest, RecursiveComparisonAssertTest> {22 public RecursiveComparisonAssertTest() {23 super(new RecursiveComparisonAssertTest(), RecursiveComparisonAssertTest.class);24 }25}26import org.assertj.core.api.AbstractAssert;27import org.assertj.core.api.RecursiveComparisonConfiguration;28import org.assertj.core.api.RecursiveComparisonAssert;29public class RecursiveComparisonAssertTest extends AbstractAssert<RecursiveComparisonAssertTest, RecursiveComparisonAssertTest> {30 public RecursiveComparisonAssertTest() {31 super(new RecursiveComparisonAssertTest(), RecursiveComparisonAssertTest.class);32 }33}34import org.assertj.core.api.AbstractAssert;35import org.assertj.core.api.RecursiveComparisonConfiguration;36import org.assertj.core.api.RecursiveComparisonAssert;37public class RecursiveComparisonAssertTest extends AbstractAssert<RecursiveComparisonAssertTest, RecursiveComparisonAssertTest> {38 public RecursiveComparisonAssertTest() {39 super(new RecursiveComparisonAssertTest(), RecursiveComparisonAssertTest.class);40 }41}42import org.assertj.core.api.AbstractAssert;43import org.assertj.core.api.RecursiveComparisonConfiguration;44import org.assertj.core.api.RecursiveComparisonAssert;
isEqualTo
Using AI Code Generation
1package com.automationrhapsody.assertj;2import java.util.ArrayList;3import java.util.List;4import org.assertj.core.api.Assertions;5import org.junit.Test;6public class RecursiveComparisonAssertTest {7 public void testAssertThat() {8 Person person = new Person("John", "Doe", 25);9 Person person2 = new Person("John", "Doe", 25);10 Assertions.assertThat(person).isEqualTo(person2);11 }12 public void testAssertThatWithList() {13 Person person = new Person("John", "Doe", 25);14 Person person1 = new Person("Jane", "Doe", 24);15 Person person2 = new Person("John", "Doe", 25);16 List<Person> list1 = new ArrayList<>();17 list1.add(person);18 list1.add(person1);19 List<Person> list2 = new ArrayList<>();20 list2.add(person);21 list2.add(person2);22 Assertions.assertThat(list1).isEqualTo(list2);23 }24 public void testAssertThatWithList2() {25 Person person = new Person("John", "Doe", 25);26 Person person1 = new Person("Jane", "Doe", 24);27 Person person2 = new Person("John", "Doe", 25);28 List<Person> list1 = new ArrayList<>();29 list1.add(person);30 list1.add(person1);31 List<Person> list2 = new ArrayList<>();32 list2.add(person);33 list2.add(person2);34 Assertions.assertThat(list1).usingRecursiveComparison().isEqualTo(list2);35 }36 public void testAssertThatWithList3() {37 Person person = new Person("John", "Doe", 25);38 Person person1 = new Person("Jane", "Doe", 24);39 Person person2 = new Person("John", "Doe", 25);40 List<Person> list1 = new ArrayList<>();41 list1.add(person);42 list1.add(person1);43 List<Person> list2 = new ArrayList<>();44 list2.add(person);45 list2.add(person2);46 Assertions.assertThat(list1).usingRecursiveComparison().isEqualTo(list2);47 }48}49package com.automationrhapsody.assertj;50public class Person {51 private String firstName;
isEqualTo
Using AI Code Generation
1import org.assertj.core.api.RecursiveComparisonAssert;2import org.assertj.core.api.Assertions;3import org.assertj.core.data.MapEntry;4public class Test {5 public static void main(String[] args) {6 RecursiveComparisonAssert recursiveComparisonAssert = Assertions.assertThat(new Test());7 recursiveComparisonAssert.isEqualTo(new Test());8 }9}10import org.assertj.core.api.RecursiveComparisonAssert;11import org.assertj.core.api.Assertions;12import org.assertj.core.data.MapEntry;13public class Test {14 public static void main(String[] args) {15 RecursiveComparisonAssert recursiveComparisonAssert = Assertions.assertThat(new Test());16 recursiveComparisonAssert.isEqualTo(new Test());17 }18}19@@ -16,6 +16,7 @@ import java.util.function.Predicate;20 package org.assertj.core.api;21+import static org.assertj.core.api.BDDAssertions.then;22 import static org.assertj.core.api.BDDAssertions.thenThrownBy;23 import static org.assertj.core.api.BDDAssertions.thenNullPointerException;24 import static org.assertj.core.api.BDDAssertions.thenIllegalArgumentException;25@@ -23,6 +24,7 @@ import static org.assertj.core.util.Preconditions.checkNotNull;26 import java.lang.reflect.Field;27 import java.util.ArrayList;28+import java.util.Arrays;29 import java.util.Collection;30 import java.util.Collections;31 import java.util.Deque;32@@ -30,6 +32,7 @@ import java.util.HashSet;33 import java.util.LinkedList;34 import java.util.List;35 import java.util.Map;36+import java.util.Objects;37 import java.util.Optional;38 import java.util.Queue;39 import java.util.Set;40@@ -37,6 +40,7 @@ import java.util.function.BiConsumer;41 import java.util.function.BiFunction;42 import java.util.function.Function;43 import java.util.function.Predicate;44+import java.util.stream.Collectors;45 import org.assertj.core.api.RecursiveComparisonConfiguration.Builder;46 import
isEqualTo
Using AI Code Generation
1package com.howtodoinjava.junit5.examples;2import static org.assertj.core.api.Assertions.assertThat;3import org.junit.jupiter.api.Test;4import com.howtodoinjava.junit5.examples.model.Employee;5{6 public void testRecursiveComparison() 7 {8 Employee e1 = new Employee(1, "John", "Smith");9 Employee e2 = new Employee(1, "John", "Smith");10 assertThat(e1).isEqualTo(e2);11 }12}13at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39)14at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:32)15at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:194)16at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:153)17at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)18at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:115)19at com.howtodoinjava.junit5.examples.AssertJRecursiveComparisonTest.testRecursiveComparison(AssertJRecursiveComparisonTest.java:16)20package com.howtodoinjava.junit5.examples;21import static org.assertj.core.api.Assertions.assertThat;22import org.junit.jupiter.api.Test;23import com.howtodoinjava.junit5.examples.model.Employee;24{25 public void testRecursiveComparison() 26 {27 Employee e1 = new Employee(1, "John", "Smith");28 Employee e2 = new Employee(1, "John", "Smith");29 assertThat(e1).usingRecursiveComparison
isEqualTo
Using AI Code Generation
1import org.assertj.core.api.*;2import org.assertj.core.api.RecursiveComparisonAssert;3import org.assertj.core.api.RecursiveComparisonConfiguration;4public class RecursiveComparisonAssertTest {5 public static void main(String[] args) {6 RecursiveComparisonAssertTest test = new RecursiveComparisonAssertTest();7 test.test();8 }9 public void test() {10 Employee e1 = new Employee("John", 21);11 Employee e2 = new Employee("John", 21);12 RecursiveComparisonAssert<Employee> recursiveComparisonAssert = Assertions.assertThat(e1).usingRecursiveComparison();13 RecursiveComparisonConfiguration recursiveComparisonConfiguration = recursiveComparisonAssert.getRecursiveComparisonConfiguration();14 recursiveComparisonConfiguration.setIgnoredFields("name");15 recursiveComparisonAssert.isEqualTo(e2);16 }17}18import org.assertj.core.api.*;19import org.assertj.core.api.RecursiveComparisonAssert;20import org.assertj.core.api.RecursiveComparisonConfiguration;21public class RecursiveComparisonAssertTest {22 public static void main(String[] args) {23 RecursiveComparisonAssertTest test = new RecursiveComparisonAssertTest();24 test.test();25 }26 public void test() {27 Employee e1 = new Employee("John", 21);28 Employee e2 = new Employee("John", 21);29 RecursiveComparisonAssert<Employee> recursiveComparisonAssert = Assertions.assertThat(e1).usingRecursiveComparison();30 RecursiveComparisonConfiguration recursiveComparisonConfiguration = recursiveComparisonAssert.getRecursiveComparisonConfiguration();31 recursiveComparisonConfiguration.setIgnoredFields("name");32 recursiveComparisonAssert.isEqualTo(e2);33 }34}35import org.assertj.core.api.*;36import org.assertj.core.api.RecursiveComparisonAssert;37import org.assertj.core.api.RecursiveComparisonConfiguration;38public class RecursiveComparisonAssertTest {39 public static void main(String[] args) {40 RecursiveComparisonAssertTest test = new RecursiveComparisonAssertTest();41 test.test();42 }43 public void test() {44 Employee e1 = new Employee("John", 21);45 Employee e2 = new Employee("John", 21);46 RecursiveComparisonAssert<Employee> recursiveComparisonAssert = Assertions.assertThat(e1).usingRecursiveComparison();47 RecursiveComparisonConfiguration recursiveComparisonConfiguration = recursiveComparisonAssert.getRecursiveComparisonConfiguration();48 recursiveComparisonConfiguration.setIgnoredFields("name");49 recursiveComparisonAssert.isEqualTo(e2);50 }51}52import org.assertj.core.api.*;53import org.assertj.core.api.RecursiveComparisonAssert;54import org.assertj.core.api
isEqualTo
Using AI Code Generation
1import org.junit.Test;2import static org.assertj.core.api.Assertions.assertThat;3public class AssertJRecursiveComparisonAssert {4 public void test() {5 assertThat(new Person("John", 35)).isEqualTo(new Person("John", 35));6 }7 class Person {8 private String name;9 private int age;10 public Person(String name, int age) {11 this.name = name;12 this.age = age;13 }14 public String getName() {15 return name;16 }17 public int getAge() {18 return age;19 }20 public boolean equals(Object o) {21 if (this == o) {22 return true;23 }24 if (o == null || getClass() != o.getClass()) {25 return false;26 }27 Person person = (Person) o;28 if (age != person.age) {29 return false;30 }31 return name != null ? name.equals(person.name) : person.name == null;32 }33 public int hashCode() {34 int result = name != null ? name.hashCode() : 0;35 result = 31 * result + age;36 return result;37 }38 }39}40 public void test() {41 Employee e1 = new Employee("John", 21);42 Employee e2 = new Employee("John", 21);43 RecursiveComparisonAssert<Employee> recursiveComparisonAssert = Assertions.assertThat(e1).usingRecursiveComparison();44 RecursiveComparisonConfiguration recursiveComparisonConfiguration = recursiveComparisonAssert.getRecursiveComparisonConfiguration();45 recursiveComparisonConfiguration.setIgnoredFields("name");46 recursiveComparisonAssert.isEqualTo(e2);47 }48}49import org.assertj.core.api.*;50import org.assertj.core.api.RecursiveComparisonAssert;51import org.assertj.core.api.RecursiveComparisonConfiguration;52public class RecursiveComparisonAssertTest {53 public static void main(String[] args) {54 RecursiveComparisonAssertTest test = new RecursiveComparisonAssertTest();55 test.test();56 }57 public void test() {58 Employee e1 = new Employee("John", 21);59 Employee e2 = new Employee("John", 21);60 RecursiveComparisonAssert<Employee> recursiveComparisonAssert = Assertions.assertThat(e1).usingRecursiveComparison();61 RecursiveComparisonConfiguration recursiveComparisonConfiguration = recursiveComparisonAssert.getRecursiveComparisonConfiguration();62 recursiveComparisonConfiguration.setIgnoredFields("name");63 recursiveComparisonAssert.isEqualTo(e2);64 }65}66import org.assertj.core.api.*;67import org.assertj.core.api.RecursiveComparisonAssert;68import org.assertj.core.api.RecursiveComparisonConfiguration;69public class RecursiveComparisonAssertTest {70 public static void main(String[] args) {71 RecursiveComparisonAssertTest test = new RecursiveComparisonAssertTest();72 test.test();73 }74 public void test() {75 Employee e1 = new Employee("John", 21);76 Employee e2 = new Employee("John", 21);77 RecursiveComparisonAssert<Employee> recursiveComparisonAssert = Assertions.assertThat(e1).usingRecursiveComparison();78 RecursiveComparisonConfiguration recursiveComparisonConfiguration = recursiveComparisonAssert.getRecursiveComparisonConfiguration();79 recursiveComparisonConfiguration.setIgnoredFields("name");80 recursiveComparisonAssert.isEqualTo(e2);81 }82}83import org.assertj.core.api.*;84import org.assertj.core.api.RecursiveComparisonAssert;85import org.assertj.core.api
isEqualTo
Using AI Code Generation
1import org.junit.Test;2import static org.assertj.core.api.Assertions.assertThat;3public class AssertJRecursiveComparisonAssert {4 public void test() {5 assertThat(new Person("John", 35)).isEqualTo(new Person("John", 35));6 }7 class Person {8 private String name;9 private int age;10 public Person(String name, int age) {11 this.name = name;12 this.age = age;13 }14 public String getName() {15 return name;16 }17 public int getAge() {18 return age;19 }20 public boolean equals(Object o) {21 if (this == o) {22 return true;23 }24 if (o == null || getClass() != o.getClass()) {25 return false;26 }27 Person person = (Person) o;28 if (age != person.age) {29 return false;30 }31 return name != null ? name.equals(person.name) : person.name == null;32 }33 public int hashCode() {34 int result = name != null ? name.hashCode() : 0;35 result = 31 * result + age;36 return result;37 }38 }39}
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!