### Question:
FoConfiguration { public MutableAttributeSet getAttributeSet( String attributeId ) { if ( attributeId == null || attributeId.length() == 0 ) { return null; } reset(); addAttributes( attributeId ); if ( attributeSet.getAttributeCount() == 0 ) { return null; } return attributeSet; } FoConfiguration(); void load( File configFile ); String getAttributeString( String attributeId ); MutableAttributeSet getAttributeSet( String attributeId );  }### Answer:
@Test public void testGetAttributeSet() { FoConfiguration config = new FoConfiguration(); assertNull( "Null attribute ID should return null AttributeSet!", config.getAttributeSet( null ) ); assertNull( "Empty attribute ID should return null AttributeSet!", config.getAttributeSet( "" ) ); assertNull( "Non existent attribute ID should return null AttributeSet!", config.getAttributeSet( "a.dummy.attribute" ) ); MutableAttributeSet expected = new SimpleAttributeSet(); expected.addAttribute( "font-style", "italic" ); MutableAttributeSet actual = config.getAttributeSet( "italic" ); assertTrue( "Wrong AttributeSet returned for italic!", expected.isEqual( actual ) ); }