### Question:
ButtonImpl implements Button { @Override public String getLink() { return StringUtils.isNotBlank(url) ? url : DEFAULT_LINK; }  @Override String getText(); @Override String getLink(); @Override String getIcon(); @Override String getExportedType();  }### Answer:
@Test public void testGetLinkForProduct() { final String expResult = "/content/sample-page.blast-mini-pump.html"; context.currentResource("/content/linkTypeProduct"); button = context.request().adaptTo(Button.class); String result = button.getLink(); assertEquals(expResult, result); }
@Test public void testGetLinkForCategory() { final String expResult = "/content/sample-page.11.html"; context.currentResource("/content/linkTypeCategory"); button = context.request().adaptTo(Button.class); String result = button.getLink(); assertEquals(expResult, result); }
@Test public void testGetLinkForExternalLink() { final String expResult = "http: context.currentResource("/content/linkTypeExternalLink"); button = context.request().adaptTo(Button.class); String result = button.getLink(); assertEquals(expResult, result); }
@Test public void testGetLinkForLinkTo() { final String expResult = "/content/venia/language-masters/en.html"; context.currentResource("/content/linkTypeLinkToPage"); button = context.request().adaptTo(Button.class); String result = button.getLink(); assertEquals(expResult, result); }
@Test public void testDefaultLink() { final String expResult = "#"; context.currentResource("/content/defaultUrl"); button = context.request().adaptTo(Button.class); String result = button.getLink(); assertEquals(expResult, result); }