public void testPageSetupAndPrintPreview() throws ComponentSearchException, InterruptedException,
NoSuchFieldException, IllegalAccessException, InvocationTargetException, IOException {
UserPreferences preferences = new DefaultUserPreferences();
ViewFactory viewFactory = new SwingViewFactory();
Home home = new Home();
ContentManager contentManager = new FileContentManager(preferences) {
@Override
public String showSaveDialog(View parentView, String dialogTitle, ContentType contentType, String name) {
String os = System.getProperty("os.name");
if (OperatingSystem.isMacOSX()) {
// Let's pretend the OS isn't Mac OS X to get a JFileChooser instance that works better in test