### Question:
DialogRewriteUtils { public static boolean isDesignDialog(Node node) throws RepositoryException { if (node == null) { return false; } String name = node.getName(); return name.equals(NameConstants.NN_DESIGN_DIALOG) || name.equals(NN_CQ_DESIGN_DIALOG) || name.equals(NN_CQ_DESIGN_DIALOG + CORAL_2_BACKUP_SUFFIX); }  static boolean hasXtype(Node node, String xtype); static boolean hasType(Node node, String type); static Property copyProperty(Node source, String relPropertyPath, Node destination, String name); static DialogType getDialogType(Node node); static boolean isDesignDialog(Node node); static final String CORAL_2_BACKUP_SUFFIX; static final String NT_DIALOG; static final String NN_CQ_DIALOG; static final String NN_CQ_DESIGN_DIALOG; static final String DIALOG_CONTENT_RESOURCETYPE_PREFIX_CORAL3; }### Answer:
@Test public void testIsDesignDialog() throws Exception { boolean allDesignDialogs = false; String[] designDialogPaths = { DIALOGS_ROOT + "/classic/design_dialog", DIALOGS_ROOT + "/coral2/cq:design_dialog", DIALOGS_ROOT + "/backupsnoreplacementdiscarded/cq:design_dialog.coral2", DIALOGS_ROOT + "/level1/classicandcoral2/design_dialog", DIALOGS_ROOT + "/level1/classicandcoral2/cq:design_dialog" }; for (String path: designDialogPaths) { Resource resource = context.resourceResolver().getResource(path); Node node = resource.adaptTo(Node.class); allDesignDialogs = DialogRewriteUtils.isDesignDialog(node); if (!allDesignDialogs) { break; } } assertTrue(allDesignDialogs); }