### Question:
StylesHelper { public static SpanProperties createSpanProperties( String style ) { Map<String, String> stylesMap = StylesHelper.parse( style ); if ( !stylesMap.isEmpty() ) { SpanProperties properties = new SpanProperties(); processContainerproperties( properties, stylesMap ); return properties; } return null; }  static Map<String, String> parse( String style ); static ParagraphProperties createParagraphProperties( String style ); static HeaderProperties createHeaderProperties( String style ); static ListItemProperties createListItemProperties( String style ); static ListProperties createListProperties( String style ); static SpanProperties createSpanProperties( String style ); static TableProperties createTableProperties( Attributes attributes ); static TableRowProperties createTableRowProperties( Attributes attributes ); static TableCellProperties createTableCellProperties( Attributes attributes );  }### Answer:
@Test public void createSpanPropertiesColor() { SpanProperties expectedSpanProperties = new SpanProperties(); expectedSpanProperties.setColor( new Color( 230, 0, 0 ) ); Assert.assertEquals( expectedSpanProperties, StylesHelper.createSpanProperties( "color: rgb(230, 0, 0);" ) ); }
@Test public void createSpanPropertiesColorInvalid() { SpanProperties expectedSpanProperties = new SpanProperties(); Assert.assertEquals( expectedSpanProperties, StylesHelper.createSpanProperties( "color: rgb(2303, 0, 0);" ) ); Assert.assertEquals( expectedSpanProperties, StylesHelper.createSpanProperties( "color: #1234567;" ) ); Assert.assertEquals( expectedSpanProperties, StylesHelper.createSpanProperties( "color: invalid;" ) ); }