@Test
public void testLayoutWithLAFDecoration() {

    // This test will not work in a headless configuration.
    if (GraphicsEnvironment.isHeadless()) {
        LOG.fine("cannot run testLAFDecorationLayout - headless environment");
        return;
    }
    if (!UIManager.getLookAndFeel().getSupportsWindowDecorations()) {
        LOG.info("cannot run test - unsupported laf window decoration");
        return;
    }
    
    JFrame.setDefaultLookAndFeelDecorated(true);
    JXFrame frame = new JXFrame();
    frame.add(new JXTable(new AncientSwingTeam()));
    frame.pack();
    Dimension dim = frame.getSize();
    assertEquals(dim, frame.getPreferredSize());
    JXStatusBar bar = new JXStatusBar();
    bar.add(new JLabel("need some content"));
    frame.setStatusBar(bar);
    frame.pack();
    try {
        assertEquals(dim.height + bar.getPreferredSize().height, frame.getPreferredSize().height);
    } finally {
        JFrame.setDefaultLookAndFeelDecorated(false);
    }
}