### Question:
JFreeChart implements Drawable, TitleChangeListener,
        PlotChangeListener, Serializable, Cloneable { public List<Title> getSubtitles() { return new ArrayList<Title>(this.subtitles); } JFreeChart(Plot plot);  JFreeChart(String title, Plot plot);  JFreeChart(String title, Font titleFont, Plot plot,
                      boolean createLegend); RenderingHints getRenderingHints(); void setRenderingHints(RenderingHints hints); boolean isBorderVisible(); void setBorderVisible(boolean visible); Stroke getBorderStroke(); void setBorderStroke(Stroke stroke); Paint getBorderPaint(); void setBorderPaint(Paint paint); RectangleInsets getPadding(); void setPadding(RectangleInsets padding); TextTitle getTitle(); void setTitle(TextTitle title); void setTitle(String text); void addLegend(LegendTitle legend); LegendTitle getLegend(); LegendTitle getLegend(int index); void removeLegend(); List<Title> getSubtitles(); void setSubtitles(List<? extends Title> subtitles); int getSubtitleCount(); Title getSubtitle(int index); void addSubtitle(Title subtitle); void addSubtitle(int index, Title subtitle); void clearSubtitles(); void removeSubtitle(Title title); Plot getPlot(); boolean getAntiAlias(); void setAntiAlias(boolean flag); Object getTextAntiAlias(); void setTextAntiAlias(boolean flag); void setTextAntiAlias(Object val); Paint getBackgroundPaint(); void setBackgroundPaint(Paint paint); Image getBackgroundImage(); void setBackgroundImage(Image image); int getBackgroundImageAlignment(); void setBackgroundImageAlignment(int alignment); float getBackgroundImageAlpha(); void setBackgroundImageAlpha(float alpha); boolean isNotify(); void setNotify(boolean notify); @Override void draw(Graphics2D g2, Rectangle2D area); void draw(Graphics2D g2, Rectangle2D area, ChartRenderingInfo info); void draw(Graphics2D g2, Rectangle2D chartArea, Point2D anchor,
                     ChartRenderingInfo info); BufferedImage createBufferedImage(int width, int height); BufferedImage createBufferedImage(int width, int height,
                                             ChartRenderingInfo info); BufferedImage createBufferedImage(int width, int height,
                                             int imageType,
                                             ChartRenderingInfo info); BufferedImage createBufferedImage(int imageWidth,
                                             int imageHeight,
                                             double drawWidth,
                                             double drawHeight,
                                             ChartRenderingInfo info); void handleClick(int x, int y, ChartRenderingInfo info); void addChangeListener(ChartChangeListener listener); void removeChangeListener(ChartChangeListener listener); void fireChartChanged(); void addProgressListener(ChartProgressListener listener); void removeProgressListener(ChartProgressListener listener); @Override void titleChanged(TitleChangeEvent event); @Override void plotChanged(PlotChangeEvent event); @Override boolean equals(Object obj); @Override Object clone(); static final Font DEFAULT_TITLE_FONT; static final Paint DEFAULT_BACKGROUND_PAINT; static final Image DEFAULT_BACKGROUND_IMAGE; static final int DEFAULT_BACKGROUND_IMAGE_ALIGNMENT; static final float DEFAULT_BACKGROUND_IMAGE_ALPHA; static final RenderingHints.Key KEY_SUPPRESS_SHADOW_GENERATION; }### Answer:
@Test public void testGetSubtitles() { DefaultPieDataset dataset = new DefaultPieDataset(); JFreeChart chart = ChartFactory.createPieChart("title", dataset); List<Title> subtitles = chart.getSubtitles(); assertEquals(1, chart.getSubtitleCount()); subtitles.add(new TextTitle("T")); assertEquals(1, chart.getSubtitleCount()); }