### Question:
AbstractLinks extends Links { HrefType buildPath(String path, Object... params) { UriComponentsBuilder uriComponentsBuilder = StringUtils.startsWith(httpUrl, "/") ? fromPath(httpUrl) : fromHttpUrl(httpUrl); return new HrefType(uriComponentsBuilder .path(path) .buildAndExpand(params) .toUriString()); } AbstractLinks(String httpUrl); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test void buildPath_absolute_path() { AbstractLinks links = new AbstractLinks(ABSOLUTE_HTTP_URL); HrefType expected = new HrefType(RESULT_ABSOLUTE_PATH); HrefType actual = links.buildPath(PAYMENT_PATH, PAYMENT_SERVICE, PAYMENT_PRODUCT, PAYMENT_ID); assertEquals(expected.getHref(), actual.getHref()); }
@Test void buildPath_relative_path() { AbstractLinks links = new AbstractLinks(RELATIVE_HTTP_URL); HrefType expected = new HrefType(RESULT_RELATIVE_PATH); HrefType actual = links.buildPath(PAYMENT_PATH, PAYMENT_SERVICE, PAYMENT_PRODUCT, PAYMENT_ID); assertEquals(expected.getHref(), actual.getHref()); }