[BAEL-6318] fix test

This commit is contained in:
uzma 2023-07-03 13:18:03 +01:00
parent b61c2af4ac
commit b6966054b4
2 changed files with 6 additions and 3 deletions

View File

@ -18,7 +18,7 @@ public class EmployeeClient {
}
public Page<EmployeeDto> getEmployeeDataFromExternalAPI(Pageable pageable) {
String url = "http://localhost:8080/external-service/employee";
String url = "http://localhost:8080/employee";
UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString(url)
.queryParam("page", pageable.getPageNumber())

View File

@ -7,6 +7,8 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import java.util.Arrays;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import org.springframework.core.ParameterizedTypeReference;
@ -59,7 +61,8 @@ public class EmployeeClientUnitTest {
isNull(),
eq(responseType)
);
assertEquals(1, result.getNumberOfElements());
assertEquals(mockedResponse, result.getContent().get(0));
assertEquals(3, result.getNumberOfElements());
List<EmployeeDto> content = result.getContent();
assertEquals(mockedResponse.getContent(), content);
}
}