### Question:
BasicMonthViewUI extends MonthViewUI { protected int getFirstDisplayedYear() { return getCalendar().get(Calendar.YEAR); }  @SuppressWarnings({ "UnusedDeclaration" }) static ComponentUI createUI(JComponent c); @Override void installUI(JComponent c); @Override void uninstallUI(JComponent c); @Override String[] getDaysOfTheWeek(); boolean isUsingKeyboard(); void setUsingKeyboard(boolean val); @Override Date getDayAtLocation(int x, int y); boolean isWeekOfYearCell(int x, int y); @Override void update(Graphics g, JComponent c); @Override void paint(Graphics g, JComponent c); @Override Date getLastDisplayedDay(); static final int MONTH_DOWN; static final int MONTH_UP; }### Answer:
@Test public void testUpdateUIFirstYear() { final JXMonthView monthView = new JXMonthView(); long first = ((BasicMonthViewUI) monthView.getUI()).getFirstDisplayedYear(); monthView.updateUI(); assertEquals(first, ((BasicMonthViewUI) monthView.getUI()).getFirstDisplayedYear()); }