@Test
public void testVisibleMonthContainsSelectionOpenInitial() {

    if (GraphicsEnvironment.isHeadless()) {
        LOG.fine("cannot run testLinkPanelNull - headless");
        return;
    }
    calendar.set(2008, Calendar.JULY, 15);
    JXDatePicker picker = new JXDatePicker(calendar.getTime());
    JXFrame frame = new JXFrame("showing", false);
    frame.add(picker);
    frame.setVisible(true);
    Action togglePopup = picker.getActionMap().get("TOGGLE_POPUP");
    togglePopup.actionPerformed(null);
    CalendarUtils.startOfMonth(calendar);
    assertEquals(calendar.getTime(), picker.getMonthView().getFirstDisplayedDay());
    frame.dispose();
}