private void validateDialogCreation(IField[] iFields, boolean disableAppendSuper)
     throws JavaModelException, Exception {
   when(dialogFactoryHelper.getObjectClassFields(objectClass, preferencesManager))
       .thenReturn(iFields);
   FieldDialog<ToStringGenerationData> toStringDialog =
       toStringDialogFactory.createDialog(
           parentShell, objectClass, excludedMethods, possibleStrategyIdentifiers);
   assertArrayEquals(
       iFields, ((OrderableFieldDialogImpl<ToStringGenerationData>) toStringDialog).getFields());
   assertEquals(
       disableAppendSuper,
       !((OrderableFieldDialogImpl<ToStringGenerationData>) toStringDialog).getAppendSuper());
 }
 @Test
 public void testGetCommandIdentifier() {
   assertEquals(
       MethodsGenerationCommandIdentifier.TO_STRING, toStringDialogFactory.getCommandIdentifier());
 }