### Question:
XSSFunctions { public static CharSequence getValidHref(XSSAPI xssAPI, String source) { return xssAPI.getValidHref(source); } private  XSSFunctions(); static CharSequence encodeForHTML(XSSAPI xssAPI, String source); @Deprecated static CharSequence encodeForHTML(com.adobe.granite.xss.XSSAPI xssAPI, String source); static CharSequence encodeForHTMLAttr(XSSAPI xssAPI, String source); @Deprecated static CharSequence encodeForHTMLAttr(com.adobe.granite.xss.XSSAPI xssAPI, String source); static CharSequence encodeForJSString(XSSAPI xssAPI, String source); @Deprecated static CharSequence encodeForJSString(com.adobe.granite.xss.XSSAPI xssAPI, String source); static CharSequence filterHTML(XSSAPI xssAPI, String source); @Deprecated static CharSequence filterHTML(com.adobe.granite.xss.XSSAPI xssAPI, String source); static CharSequence getValidHref(XSSAPI xssAPI, String source); @Deprecated static CharSequence getValidHref(com.adobe.granite.xss.XSSAPI xssAPI, String source); static String getValidDimension(XSSAPI xssAPI, String dimension, String defaultValue); @Deprecated static String getValidDimension(com.adobe.granite.xss.XSSAPI xssAPI, String dimension, String defaultValue); static Integer getValidInteger(XSSAPI xssAPI, String integer, int defaultValue); @Deprecated static Integer getValidInteger(com.adobe.granite.xss.XSSAPI xssAPI, String integer, int defaultValue); static String getValidJSToken(XSSAPI xssAPI, String token, String defaultValue); @Deprecated static String getValidJSToken(com.adobe.granite.xss.XSSAPI xssAPI, String token, String defaultValue);  }### Answer:
@Test public void testGetValidHref() { final String test = "/content/foo.html"; when(xssAPI.getValidHref(test)).thenReturn(test); XSSFunctions.getValidHref(xssAPI, test); verify(xssAPI, only()).getValidHref(test); }
@Test public void testGetValidHref_granite() { final String test = "/content/foo.html"; when(graniteXssAPI.getValidHref(test)).thenReturn(test); XSSFunctions.getValidHref(graniteXssAPI, test); verify(graniteXssAPI, only()).getValidHref(test); }