public void testTextSource() throws Exception {
    myState.put(ATTR_SOURCE_TYPE, SourceType.TEXT);

    ArgumentCaptor<ActionBarIconGenerator.ActionBarOptions> argument = runImageTest();

    TextRenderUtil.Options options = new TextRenderUtil.Options();
    options.font = Font.decode(myState.getString(ATTR_FONT) + " " + myState.getInt(ATTR_FONT_SIZE));
    options.foregroundColor = 0xFFFFFFFF;
    BufferedImage expectedImage =
        TextRenderUtil.renderTextImage(myState.getString(ATTR_TEXT), 1, options);

    assertImagesSimilar("TextImage", expectedImage, argument.getValue().sourceImage, 5.0f);
  }