@Test
public void testCollapsingNonShowingPane() {

    JXCollapsiblePane pane = new JXCollapsiblePane();
    pane.add(new JLabel("some content"));
    
    PropertyChangeListener pcl = mock(PropertyChangeListener.class);
    pane.addPropertyChangeListener("collapsed", pcl);
    
    pane.setCollapsed(true);
    
    // this fails if we animate because the property change
    // will enqueue on the EDT after this check
    verify(pcl).propertyChange(argThat(is(property("collapsed", false, true))));
}