@@ -0,0 +1,1070 @@
+package ca.uhn.fhir.mdm.api.paging;%0A%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.equalTo;%0Aimport static org.junit.jupiter.api.Assertions.*;%0A%0Aclass MdmPageLinkBuilderTest %7B%0A%0A%09@Test%0A%09void buildLinkWithExistingParameters() %7B%0A%09%09//Given%0A%09%09String expected = %22http://localhost:8000/$mdm-query-links?sourceResourceId=Patient/123&_offset=1&_count=1%22;%0A%09%09String baseUrl = %22http://localhost:8000/$mdm-query-links?sourceResourceId=Patient/123%22;%0A%0A%09%09//When%0A%09%09String builtUrl = MdmPageLinkBuilder.buildLinkWithOffsetAndCount(baseUrl, 1, 1);%0A%0A%09%09//Then%0A%09%09assertThat(builtUrl, is(equalTo(expected)));%0A%09%7D%0A%0A%09@Test%0A%09void buildLinkWithoutExistingParameters() %7B%0A%09%09//Given%0A%09%09String expected = %22http://localhost:8000/$mdm-query-links?_offset=1&_count=1%22;%0A%09%09String baseUrl = %22http://localhost:8000/$mdm-query-links%22;%0A%0A%09%09//When%0A%09%09String builtUrl = MdmPageLinkBuilder.buildLinkWithOffsetAndCount(baseUrl, 1, 1);%0A%0A%09%09//Then%0A%09%09assertThat(builtUrl, is(equalTo(expected)));%0A%09%7D%0A%7D%0A

Add tests for link builder