### Question:
Colors { public static String asHex(String color) { Matcher rgbMatcher = RGB_PATTERN.matcher(color); if (rgbMatcher.matches()) { return formatRgbAsHex(asInt(rgbMatcher.group(1)), asInt(rgbMatcher.group(2)), asInt(rgbMatcher.group(3))); } return color; } private  Colors(); static String asHex(String color);  }### Answer:
@Test public void asHexToHex() { String hex = Colors.asHex("#ffffff"); assertEquals("#ffffff", hex); }
@Test public void asHexReturnsOriginalValueWhenNotRgb() { String hex = Colors.asHex("foo"); assertEquals("foo", hex); }