### Question:
HTMLColorParser { public static Color parse( String colorString ) { if ( colorString == null || colorString.isEmpty() ) { return null; } if ( colorString.startsWith( "rgb" ) ) { return parseRgb( colorString ); } else if ( colorString.startsWith( "#" ) && colorString.length() == 7 ) { return parseHexadecimalValues( colorString ); } else { return null; } }  static Color parse( String colorString );  }### Answer:
@Test public void parseMinMax() { assertEquals( new Color( 0, 15, 255 ), HTMLColorParser.parse( "rgb(0,15,255)" ) ); assertEquals( new Color( 0, 15, 255 ), HTMLColorParser.parse( "#000FFF" ) ); assertEquals( new Color( 0, 15, 255 ), HTMLColorParser.parse( "#000fff" ) ); }
@Test public void parseInvalidArgumentReturnsNull() { assertNull( HTMLColorParser.parse( "rgb(0,15,256)" ) ); assertNull( HTMLColorParser.parse( "#XXFFAA" ) ); }