Source:
<code>public void testDialogToolInteraction() { enterTestText(); assertEquals(TEST_TEXT, getToolMemberText()); selectFormatting(FormattingOptions.SERIF); assertEquals(FONT_SERIF, getToolMemberFont()); assertEquals(FONT_SERIF, fontSpinner.getSelectedItem()); selectFormatting(FormattingOptions.UNDERLINE); assertTrue(getToolMemberUnderlined()); assertTrue(underlinedToggleButton.isChecked()); assertEquals(getFontString(FormattingOptions.UNDERLINE), underlinedToggleButton.getText().toString()); selectFormatting(FormattingOptions.UNDERLINE); assertFalse(getToolMemberUnderlined()); assertFalse(underlinedToggleButton.isChecked()); assertEquals(getFontString(FormattingOptions.UNDERLINE), underlinedToggleButton.getText().toString()); selectFormatting(FormattingOptions.ITALIC); assertTrue(getToolMemberItalic()); assertTrue(italicToggleButton.isChecked()); assertEquals(getFontString(FormattingOptions.ITALIC), italicToggleButton.getText().toString()); selectFormatting(FormattingOptions.ITALIC); assertFalse(getToolMemberItalic()); assertFalse(italicToggleButton.isChecked()); assertEquals(getFontString(FormattingOptions.ITALIC), italicToggleButton.getText().toString()); selectFormatting(FormattingOptions.BOLD); assertTrue(getToolMemberBold()); assertTrue(boldToggleButton.isChecked()); assertEquals(getFontString(FormattingOptions.BOLD), boldToggleButton.getText().toString()); selectFormatting(FormattingOptions.BOLD); assertFalse(getToolMemberBold()); assertFalse(boldToggleButton.isChecked()); assertEquals(getFontString(FormattingOptions.BOLD), boldToggleButton.getText().toString()); selectFormatting(FormattingOptions.SIZE_30); assertEquals("Tool member has wrong value for text size", TEXT_SIZE_30, getToolMemberTextSize()); assertEquals("Wrong current item of text size spinner", <START> String.valueOf(TEXT_SIZE_30_STRING), textSizeSpinner.getSelectedItem()); <END> }</code><technical_language>String.valueOf is needed, TEXT_SIZE_30_STRING is a string</technical_language>

Target:
public void testDialogToolInteraction() { enterTestText(); assertEquals(TEST_TEXT, getToolMemberText()); selectFormatting(FormattingOptions.SERIF); assertEquals(FONT_SERIF, getToolMemberFont()); assertEquals(FONT_SERIF, fontSpinner.getSelectedItem()); selectFormatting(FormattingOptions.UNDERLINE); assertTrue(getToolMemberUnderlined()); assertTrue(underlinedToggleButton.isChecked()); assertEquals(getFontString(FormattingOptions.UNDERLINE), underlinedToggleButton.getText().toString()); selectFormatting(FormattingOptions.UNDERLINE); assertFalse(getToolMemberUnderlined()); assertFalse(underlinedToggleButton.isChecked()); assertEquals(getFontString(FormattingOptions.UNDERLINE), underlinedToggleButton.getText().toString()); selectFormatting(FormattingOptions.ITALIC); assertTrue(getToolMemberItalic()); assertTrue(italicToggleButton.isChecked()); assertEquals(getFontString(FormattingOptions.ITALIC), italicToggleButton.getText().toString()); selectFormatting(FormattingOptions.ITALIC); assertFalse(getToolMemberItalic()); assertFalse(italicToggleButton.isChecked()); assertEquals(getFontString(FormattingOptions.ITALIC), italicToggleButton.getText().toString()); selectFormatting(FormattingOptions.BOLD); assertTrue(getToolMemberBold()); assertTrue(boldToggleButton.isChecked()); assertEquals(getFontString(FormattingOptions.BOLD), boldToggleButton.getText().toString()); selectFormatting(FormattingOptions.BOLD); assertFalse(getToolMemberBold()); assertFalse(boldToggleButton.isChecked()); assertEquals(getFontString(FormattingOptions.BOLD), boldToggleButton.getText().toString()); selectFormatting(FormattingOptions.SIZE_30); assertEquals("Tool member has wrong value for text size", TEXT_SIZE_30, getToolMemberTextSize()); assertEquals("Wrong current item of text size spinner", TEXT_SIZE_30_STRING, textSizeSpinner.getSelectedItem()); }