### Question:
DocxColorGenerator { public static String generate( Color color ) { String hexRed = Integer.toHexString( color.getRed() ); String hexGreen = Integer.toHexString( color.getGreen() ); String hexBlue = Integer.toHexString( color.getBlue() ); return String.format( "%2s%2s%2s", hexRed, hexGreen, hexBlue ).replaceAll( " ", "0" ).toUpperCase(); }  static String generate( Color color );  }### Answer:
@Test public void parse() { Assert.assertEquals( "000000", DocxColorGenerator.generate( new Color( 0, 0, 0 ) ) ); Assert.assertEquals( "FFFFFF", DocxColorGenerator.generate( new Color( 255, 255, 255 ) ) ); Assert.assertEquals( "0F8524", DocxColorGenerator.generate( new Color( 15, 133, 36 ) ) ); }