### Question:
TextSymbolizerEditGUI extends AbstractStyleEditGUI { public JComboBox getJComboBoxFont() { if (jComboBoxFont == null) { jComboBoxFont = new JComboBox(); List<Literal>[] fontFamilies = asv.getAvailableFonts(); jComboBoxFont.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JLabel proto = (JLabel) super.getListCellRendererComponent( list, value, index, isSelected, cellHasFocus); ArrayList<Literal> itemValue = (ArrayList<Literal>) value; proto.setText(itemValue.get(0).toString()); return proto; } }); jComboBoxFont.setModel(new DefaultComboBoxModel(fontFamilies)); jComboBoxFont.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { ArrayList<Literal> fontExpressions = (ArrayList<Literal>) jComboBoxFont .getSelectedItem(); rulesList.getSymbolizer().getFont().getFamily().clear(); rulesList.getSymbolizer().getFont().getFamily() .addAll(fontExpressions); rulesList.fireEvents(new RuleChangedEvent( "The FontFamiliy changed to " + fontExpressions.toString(), rulesList)); } } }); SwingUtil.addMouseWheelForCombobox(jComboBoxFont); } return jComboBoxFont; } TextSymbolizerEditGUI(TextRuleList rulesList,
			AtlasStylerVector atlasStyler,
			FeatureCollection<SimpleFeatureType, SimpleFeature> previewFeatures); JComboBox getJComboBoxFont(); void updateGui(final TextSymbolizer symbolizer); static final String[] FONT_STYLES; static final String[] FONT_WEIGHTS; static final Double[] SIZES; }### Answer:
@Test public void testGetFontComboBox() throws IOException { TextSymbolizerEditGUI textSymbolizerEditGUI = new TextSymbolizerEditGUI( tr, atlasStyler, STYLED_FS.getFeatureCollection()); JComboBox jComboBoxFont = textSymbolizerEditGUI.getJComboBoxFont(); assertEquals("default number of fonts is 5", 5, jComboBoxFont.getItemCount()); }
@Test public void testGetFontComboBox2() throws IOException { List<Font> fonts = new ArrayList<Font>(); atlasStyler.setFonts(fonts); TextSymbolizerEditGUI textSymbolizerEditGUI = new TextSymbolizerEditGUI( tr, atlasStyler, TestDatasetsVector.countryShp.getFeatureCollection()); JComboBox jComboBoxFont = textSymbolizerEditGUI.getJComboBoxFont(); assertEquals("default number of fonts is 5", 5, jComboBoxFont.getItemCount()); }