diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/templates/TemplateCompletionTests.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/templates/TemplateCompletionTests.java index e898ec2f5e0..cafb90b4d60 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/templates/TemplateCompletionTests.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/templates/TemplateCompletionTests.java @@ -13,8 +13,8 @@ package org.eclipse.jdt.text.tests.templates; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; import java.util.Arrays; import java.util.List; @@ -102,9 +102,7 @@ public void testExepectNoProposals() throws Exception { List proposals= computeCompletionProposals(cu, completionIndex); boolean fail= proposals.stream().anyMatch(p -> "new_class - create new class".equals(p.getDisplayString())); - if (fail) { - fail("Proposal '" + propDisplay + "' should not exist"); - } + assertFalse("Proposal '" + propDisplay + "' should not exist", fail); } @Test diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractConstantTests1d7.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractConstantTests1d7.java index 4058d00dcdf..8ee5a694443 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractConstantTests1d7.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractConstantTests1d7.java @@ -13,8 +13,8 @@ *******************************************************************************/ package org.eclipse.jdt.ui.tests.refactoring; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; import org.junit.Test; import org.junit.runner.RunWith; @@ -62,7 +62,7 @@ private void failHelper2(int startLine, int startColumn, int endLine, int endCol assertNotNull("precondition was supposed to fail", result); if(checkMsg) - assertTrue(errorMsg.equals(result.getEntryMatchingSeverity(RefactoringStatus.FATAL).getMessage())); + assertEquals(errorMsg, result.getEntryMatchingSeverity(RefactoringStatus.FATAL).getMessage()); } //--- TESTS diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTestsBase.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTestsBase.java index c15966550b4..cb9aaa05d18 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTestsBase.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTestsBase.java @@ -15,6 +15,7 @@ package org.eclipse.jdt.ui.tests.refactoring; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -164,10 +165,8 @@ private ISourceRange findSelectionInSource(String source) throws Exception { int begin= source.indexOf(SELECTION_START_HERALD) + SELECTION_START_HERALD.length(); int end= source.indexOf(SELECTION_END_HERALD); - if (begin < SELECTION_START_HERALD.length()) - fail("No selection start comment in input source file!"); - if (end < 0) - fail("No selection end comment in input source file!"); + assertFalse("No selection start comment in input source file!", begin < SELECTION_START_HERALD.length()); + assertFalse("No selection end comment in input source file!", end < 0); return new SourceRange(begin, end-begin); } diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MakeStaticRefactoringTests.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MakeStaticRefactoringTests.java index 3e27b71c220..bf0ee496ffa 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MakeStaticRefactoringTests.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MakeStaticRefactoringTests.java @@ -12,6 +12,7 @@ package org.eclipse.jdt.ui.tests.refactoring; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -154,14 +155,14 @@ public void testArrayParameterAndReturnType() throws Exception { public void testMethodNotFound() throws Exception { //Method cannot be found RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 2, 0, 2, 1); - assertTrue(status.getEntryWithHighestSeverity().getMessage().equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_on_this_selection)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_on_this_selection); } @Test public void testIsConstructor() throws Exception { //Check if Constructor RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 2, 12, 2, 15); - assertTrue(status.getEntryWithHighestSeverity().getMessage().equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_constructors)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_constructors); } @Test @@ -197,46 +198,42 @@ public void testMultipleFilesInSameProject() throws Exception { public void testRecursive() throws Exception { //MethodInvocation in MethodDeclaration with object of the same Class in parameter RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 3, 10, 3, 13); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_recursive_methods)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_recursive_methods); } @Test public void testRecursive2() throws Exception { //recursive invocation after invoking a method that returns a new instance of the same class RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 6, 10, 6, 13); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_recursive_methods)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_recursive_methods); } @Test public void testRecursive3() throws Exception { //simple recursive invocation of instance method RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 2, 17, 2, 20); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_recursive_methods)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_recursive_methods); } @Test public void testInheritance() throws Exception { //Refactor of method that overrides method of supertype (Selection is set to MethodDeclaration) RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.SubClass", "p.SuperClass" }, 4, 19, 4, 22); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_explicit_super_method_invocation)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_explicit_super_method_invocation); } @Test public void testInheritance2() throws Exception { //Refactor of method in super type that has child type overriding the method -> should fail RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.SuperClass", "p.SubClass" }, 3, 19, 3, 22); - assertTrue(status.getEntryWithHighestSeverity().getMessage().equals(RefactoringCoreMessages.MakeStaticRefactoring_method_is_overridden_in_subtype)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_method_is_overridden_in_subtype); } @Test public void testInheritance3() throws Exception { //Selecting SuperMethodInvocation -> should fail RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.SubClass", "p.SuperClass" }, 5, 26, 5, 29); - assertTrue(status.getEntryWithHighestSeverity().getMessage().equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_super_method_invocations)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_super_method_invocations); } @Test @@ -244,14 +241,14 @@ public void testInheritance4() throws Exception { //Refactor method without parameters on the lowest hierarchy level -> //After refactoring it is static but has the same signature as parent type method -> should fail RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.SubClass", "p.SuperClass" }, 4, 19, 4, 22); - assertTrue(status.getEntryWithHighestSeverity().getMessage().equals(RefactoringCoreMessages.MakeStaticRefactoring_hiding_method_of_parent_type)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_hiding_method_of_parent_type); } @Test public void testInheritance5() throws Exception { //Inheritance with Recursion RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.SubClass", "p.SuperClass" }, 4, 10, 4, 13); - assertTrue(status.getEntryWithHighestSeverity().getMessage().equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_recursive_methods)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_recursive_methods); } @Test @@ -265,8 +262,7 @@ public void testDuplicateParamName() throws Exception { public void testDuplicateMethod() throws Exception { //Selected method has instance usage and there is an existing method that is equal to the selected method after being refactored RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 5, 19, 5, 22); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_duplicate_method_signature)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_duplicate_method_signature); } @Test @@ -280,8 +276,7 @@ public void testDuplicateMethod2() throws Exception { public void testMethodAlreadyStatic() throws Exception { //Selected method is already static RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 2, 24, 2, 27); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_method_already_static)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_method_already_static); } @Test @@ -353,16 +348,14 @@ public void testGenericDeclaration8() throws Exception { public void testGenericDeclaration9() throws Exception { //check for wildcardTypes as bounds (T extends List) RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 7, 17, 7, 20); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_wildCardTypes_as_bound)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_wildCardTypes_as_bound); } @Test public void testGenericDeclaration10() throws Exception { //check for wildcardTypes as bounds (T extends Map) RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 7, 17, 7, 20); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_wildCardTypes_as_bound)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_wildCardTypes_as_bound); } @Test @@ -419,8 +412,7 @@ public void testMethodCallInNestedAnonymousClass() throws Exception { public void testVariousInstanceCases() throws Exception { //Various cases of instance access in many different forms RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.SubClass", "p.SuperClass" }, 14, 17, 14, 20); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_selected_method_uses_super_field_access)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_selected_method_uses_super_field_access); } @Test @@ -455,8 +447,7 @@ public void testPassingInstanceReference() throws Exception { public void testSuperMethodReference() throws Exception { //Selected method is used in SuperMethodReference -> Should throw error RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.SuperClass", "p.SubClass" }, 4, 19, 4, 22); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_method_references)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_method_references); } @Test @@ -477,8 +468,7 @@ public void testReturnField() throws Exception { public void testExplicitSuperMethodInvocation() throws Exception { //MethodDeclaration uses explcit SuperMethodInvocation to call method of parent type -> semantic change not allowed RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.SubClass", "p.SuperClass" }, 3, 17, 3, 20); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_explicit_super_method_invocation)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_explicit_super_method_invocation); } @Test @@ -492,8 +482,7 @@ public void testImplicitSuperMethodInvocation() throws Exception { public void testSuperFieldAccess() throws Exception { //MethodDeclaration uses SuperFieldAccess -> throws warning but is possible RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.SubClass", "p.SuperClass" }, 6, 17, 6, 20); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_selected_method_uses_super_field_access)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_selected_method_uses_super_field_access); } @Test @@ -505,8 +494,7 @@ public void testConcatenatedFieldAccessAndQualifiedNames() throws Exception { @Test public void testSourceNotAvailable() throws Exception { RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 3, 20, 3, 27); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_source_not_available_for_selected_method)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_source_not_available_for_selected_method); } @Test @@ -527,8 +515,7 @@ public void testClassInstanceCreation() throws Exception { public void testConvertMethodReferenceToLambda() throws Exception { //MethodReference needs to be co0nverted to lambda because refactored method accepts two parameters RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 10, 10, 10, 13); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_method_references)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_method_references); } @Test @@ -541,32 +528,28 @@ public void testNested() throws Exception { public void testMethodReference() throws Exception { //TypeMethodReference RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 8, 10, 8, 13); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_method_references)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_method_references); } @Test public void testMethodReference2() throws Exception { //ExpressionMethodReference in anonymous class -> Refactoring not allowed in anonymous class and method references also not allowed RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 4, 26, 4, 29); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_local_or_anonymous_types)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_local_or_anonymous_types); } @Test public void testMethodReference3() throws Exception { //ExpressionMethodReference with recursion RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 2, 17, 2, 20); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_recursive_methods)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_recursive_methods); } @Test public void testMethodReference4() throws Exception { //ExpressionMethodReference RefactoringStatus status= performRefactoringAndMatchFiles(new String[] { "p.Foo" }, 8, 17, 8, 20); - assertTrue(status.getEntryWithHighestSeverity().getMessage() - .equals(RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_method_references)); + assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_method_references); } @Test diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/WrappingSystemTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/WrappingSystemTest.java index 69de4b34899..1685e1cd628 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/WrappingSystemTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/WrappingSystemTest.java @@ -14,9 +14,9 @@ package org.eclipse.jdt.junit.tests; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; import java.util.Iterator; import java.util.List; @@ -213,10 +213,9 @@ protected void waitForTableToFill(int numExpectedTableLines, int millisecondTimeout, boolean lastItemHasImage) throws PartInitException { long startTime = System.currentTimeMillis(); while (stillWaiting(numExpectedTableLines, lastItemHasImage)) { - if (System.currentTimeMillis() - startTime > millisecondTimeout) - fail("Timeout waiting for " + numExpectedTableLines - + " lines in table. Present: " + getNumTableItems() + " items.\n" - + "The 2nd vm has " + (hasNotTerminated() ? "not " : "") + "terminated."); + assertFalse("Timeout waiting for " + numExpectedTableLines + + " lines in table. Present: " + getNumTableItems() + " items.\n" + + "The 2nd vm has " + (hasNotTerminated() ? "not " : "") + "terminated.", System.currentTimeMillis() - startTime > millisecondTimeout); dispatchEvents(); } } diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java index 5e0b677e84f..6d700bc164a 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java @@ -16,6 +16,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -297,7 +298,7 @@ public void testBug578547() { filter= new TypeInfoFilter("Test", scope, 0, null); assertEquals("Test", filter.getNamePattern()); - assertEquals(null, filter.getPackagePattern()); + assertNull(filter.getPackagePattern()); } } \ No newline at end of file diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/hover/JavadocHoverTests.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/hover/JavadocHoverTests.java index d0f458e1138..f2ca7280516 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/hover/JavadocHoverTests.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/hover/JavadocHoverTests.java @@ -15,7 +15,7 @@ package org.eclipse.jdt.ui.tests.hover; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -204,7 +204,7 @@ int check (String value, String[] strings) { // value should be expanded: int index= actualHtmlContent.indexOf("
");
-			assertFalse(index == -1);
+			assertNotEquals(-1, index);
 			String actualSnippet= actualHtmlContent.substring(index, index + expectedCodeSequence.length());
 			assertEquals("sequence doesn't match", expectedCodeSequence, actualSnippet);
 		}
@@ -255,7 +255,7 @@ int check (String value, String[] strings) {
 
 			// value should be expanded:
 			int index= actualHtmlContent.indexOf("
{");
-			assertFalse(index == -1);
+			assertNotEquals(-1, index);
 			String actualSnippet= actualHtmlContent.substring(index, index + expectedCodeSequence.length());
 			assertEquals("sequence doesn't match", expectedCodeSequence, actualSnippet);
 		}
@@ -319,7 +319,7 @@ int check (String value, String[] strings) {
 
 			// value should be expanded:
 			int index= actualHtmlContent.indexOf("
");
-			assertFalse(index == -1);
+			assertNotEquals(-1, index);
 			String actualSnippet= actualHtmlContent.substring(index, index + expectedCodeSequence.length());
 			assertEquals("sequence doesn't match", actualSnippet, expectedCodeSequence);
 		}
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java
index f406680d4a1..1ae0fcfa127 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java
@@ -4780,7 +4780,7 @@ public String reduceSubstringOnExpression(String text) {
 			}
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.SubstringCleanUp_description)));
 	}
@@ -5600,7 +5600,7 @@ public static String removeUnnecessaryConstructorInvocationsInArrayAccess(String
 		enable(CleanUpConstants.VALUEOF_RATHER_THAN_INSTANTIATION);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(
 						MultiFixMessages.ValueOfRatherThanInstantiationCleanup_description_float_with_valueof,
@@ -5663,7 +5663,7 @@ public static void replaceWrapperConstructorsWithValueOf() {
 		enable(CleanUpConstants.VALUEOF_RATHER_THAN_INSTANTIATION);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.ValueOfRatherThanInstantiationCleanup_description_float_with_float_value)));
 	}
@@ -5789,7 +5789,7 @@ public int refactorIntegerCast(int number, int anotherNumber) {
 		enable(CleanUpConstants.PRIMITIVE_COMPARISON);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.PrimitiveComparisonCleanUp_description)));
 	}
@@ -6080,7 +6080,7 @@ public static void removeUnnecessaryValueOfCalls() {
 		enable(CleanUpConstants.PRIMITIVE_PARSING);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.PrimitiveParsingCleanUp_description)));
 	}
@@ -6788,7 +6788,7 @@ public void replaceBitAssignedWrapper(Boolean aBoolean, Boolean anotherBoolean,
 		enable(CleanUpConstants.PRIMITIVE_RATHER_THAN_WRAPPER);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected }, new HashSet<>(Arrays.asList(MultiFixMessages.PrimitiveRatherThanWrapperCleanUp_description)));
 	}
 
@@ -7320,7 +7320,7 @@ public void replaceBitAssignedWrapper(int anInteger, int anotherInteger,
 		enable(CleanUpConstants.PRIMITIVE_RATHER_THAN_WRAPPER);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected }, new HashSet<>(Arrays.asList(MultiFixMessages.PrimitiveRatherThanWrapperCleanUp_description)));
 	}
 
@@ -7841,7 +7841,7 @@ public void replaceWrapperAssignedOnWrapperField() {
 		enable(CleanUpConstants.PRIMITIVE_RATHER_THAN_WRAPPER);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected }, new HashSet<>(Arrays.asList(MultiFixMessages.PrimitiveRatherThanWrapperCleanUp_description)));
 	}
 
@@ -8390,7 +8390,7 @@ public void replaceBitAssignedWrapper(Integer anInteger, Integer anotherInteger,
 		enable(CleanUpConstants.PRIMITIVE_RATHER_THAN_WRAPPER);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected }, new HashSet<>(Arrays.asList(MultiFixMessages.PrimitiveRatherThanWrapperCleanUp_description)));
 	}
 
@@ -9047,7 +9047,7 @@ public void replaceBitAssignedWrapper(Integer aInteger, Integer anotherInteger,
 		enable(CleanUpConstants.PRIMITIVE_RATHER_THAN_WRAPPER);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected }, new HashSet<>(Arrays.asList(MultiFixMessages.PrimitiveRatherThanWrapperCleanUp_description)));
 	}
 
@@ -9674,7 +9674,7 @@ public void replaceBitAssignedWrapper(Long aLong, Long anotherLong,
 		enable(CleanUpConstants.PRIMITIVE_RATHER_THAN_WRAPPER);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected }, new HashSet<>(Arrays.asList(MultiFixMessages.PrimitiveRatherThanWrapperCleanUp_description)));
 	}
 
@@ -10235,7 +10235,7 @@ public void replaceBitAssignedWrapper(Float aFloat, Float anotherFloat,
 		enable(CleanUpConstants.PRIMITIVE_RATHER_THAN_WRAPPER);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected }, new HashSet<>(Arrays.asList(MultiFixMessages.PrimitiveRatherThanWrapperCleanUp_description)));
 	}
 
@@ -10834,7 +10834,7 @@ public void replaceBitAssignedWrapper(Double aDouble, Double anotherDouble,
 		enable(CleanUpConstants.PRIMITIVE_RATHER_THAN_WRAPPER);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected }, new HashSet<>(Arrays.asList(MultiFixMessages.PrimitiveRatherThanWrapperCleanUp_description)));
 	}
 
@@ -10935,7 +10935,7 @@ public boolean isEnabled(String key) {
 		enable(CleanUpConstants.PRIMITIVE_RATHER_THAN_WRAPPER);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.PrimitiveRatherThanWrapperCleanUp_description)));
 	}
@@ -11976,7 +11976,7 @@ public char replaceCharBitwiseOperation(char c1, char c2, char c3) {
 			}
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.OperandFactorizationCleanUp_description)));
 	}
@@ -12269,7 +12269,7 @@ public void replaceDuplicateConditionsWithExpressions(int i1, int i2, int i3, in
 			}
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.TernaryOperatorCleanUp_description)));
 	}
@@ -12493,7 +12493,7 @@ public void replaceTernaryWithFields() {
 			}
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.StrictlyEqualOrDifferentCleanUp_description)));
 	}
@@ -12820,7 +12820,7 @@ public void simplifyBooleanWrapperExpression(Boolean isValid) {
 		enable(CleanUpConstants.BOOLEAN_VALUE_RATHER_THAN_COMPARISON);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected }, new HashSet<>(Arrays.asList(MultiFixMessages.BooleanValueRatherThanComparisonCleanUp_description)));
 	}
 
@@ -13293,7 +13293,7 @@ public Integer refactorReturnNoElse4(Integer number) {
 			}
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.RedundantComparisonStatementCleanup_description)));
 	}
@@ -13699,7 +13699,7 @@ public int removeUncaughtCode(boolean b1, boolean b2) throws IOException {
 		enable(CleanUpConstants.UNREACHABLE_BLOCK);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.UnreachableBlockCleanUp_description)));
 	}
@@ -14423,7 +14423,7 @@ public void mergeLongDuplicateCode(boolean isActive, boolean isValid, int number
 		enable(CleanUpConstants.MERGE_CONDITIONAL_BLOCKS);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.MergeConditionalBlocksCleanup_description_if_suite, MultiFixMessages.MergeConditionalBlocksCleanup_description_inner_if)));
 	}
@@ -15668,7 +15668,7 @@ public void refactorWithoutBrackets(boolean isValid, boolean isCreation) {
 		enable(CleanUpConstants.PULL_OUT_IF_FROM_IF_ELSE);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected }, new HashSet<>(Arrays.asList(MultiFixMessages.PullOutIfFromIfElseCleanUp_description)));
 	}
 
@@ -16062,7 +16062,7 @@ public List refactoreSortedList(List listToSort) {
 		enable(CleanUpConstants.REDUNDANT_COMPARATOR);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.RedundantComparatorCleanUp_description)));
 	}
@@ -16293,7 +16293,7 @@ public void refactorArrayInstantiations() {
 		enable(CleanUpConstants.ARRAY_WITH_CURLY);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.ArrayWithCurlyCleanup_description)));
 	}
@@ -16610,7 +16610,7 @@ public int inlineUnusedVariableInFinally() {
 		enable(CleanUpConstants.RETURN_EXPRESSION);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.ReturnExpressionCleanUp_description)));
 	}
@@ -16750,7 +16750,7 @@ public boolean simplifyNLS(String x) {
 		enable(CleanUpConstants.SIMPLIFY_BOOLEAN_IF_ELSE);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.CodeStyleCleanUp_SimplifyBooleanIfElse_description)));
 	}
@@ -16830,7 +16830,7 @@ public boolean simplifyNLS(String x) {
 		enable(CleanUpConstants.REDUCE_INDENTATION);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.CodeStyleCleanUp_SimplifyBooleanIfElse_description)));
 	}
@@ -17524,7 +17524,7 @@ public void replaceWhileButOnlyRemoveBreakForTheWhileLoop(boolean b, int magicVa
 		enable(CleanUpConstants.UNLOOPED_WHILE);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.UnloopedWhileCleanUp_description)));
 	}
@@ -20225,7 +20225,7 @@ public void refactorNegativeCondition(Date date) {
 		enable(CleanUpConstants.REDUCE_INDENTATION);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.CodeStyleCleanUp_ReduceIndentation_description)));
 	}
@@ -22429,7 +22429,7 @@ public void refactorFieldInSubClass() {
 		enable(CleanUpConstants.SINGLE_USED_FIELD);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.SingleUsedFieldCleanUp_description_new_local_var_declaration,
 						MultiFixMessages.SingleUsedFieldCleanUp_description_old_field_declaration, MultiFixMessages.SingleUsedFieldCleanUp_description_uses_of_the_var)));
@@ -22492,7 +22492,7 @@ public void refactorFieldWithComplexUse(boolean b, List texts) {
 		enable(CleanUpConstants.SINGLE_USED_FIELD);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.SingleUsedFieldCleanUp_description_new_local_var_declaration,
 						MultiFixMessages.SingleUsedFieldCleanUp_description_old_field_declaration, MultiFixMessages.SingleUsedFieldCleanUp_description_uses_of_the_var)));
@@ -22533,7 +22533,7 @@ public void refactorArray() {
 		enable(CleanUpConstants.SINGLE_USED_FIELD);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.SingleUsedFieldCleanUp_description_new_local_var_declaration,
 						MultiFixMessages.SingleUsedFieldCleanUp_description_old_field_declaration, MultiFixMessages.SingleUsedFieldCleanUp_description_uses_of_the_var)));
@@ -22596,7 +22596,7 @@ public void severalUses(int i) {
 		enable(CleanUpConstants.SINGLE_USED_FIELD);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.SingleUsedFieldCleanUp_description_new_local_var_declaration,
 						MultiFixMessages.SingleUsedFieldCleanUp_description_old_field_declaration, MultiFixMessages.SingleUsedFieldCleanUp_description_uses_of_the_var)));
@@ -22637,7 +22637,7 @@ public void refactorStaticField() {
 		enable(CleanUpConstants.SINGLE_USED_FIELD);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.SingleUsedFieldCleanUp_description_new_local_var_declaration,
 						MultiFixMessages.SingleUsedFieldCleanUp_description_old_field_declaration, MultiFixMessages.SingleUsedFieldCleanUp_description_uses_of_the_var)));
@@ -22686,7 +22686,7 @@ public void methodWithLocalVariable() {
 		enable(CleanUpConstants.SINGLE_USED_FIELD);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.SingleUsedFieldCleanUp_description_new_local_var_declaration,
 						MultiFixMessages.SingleUsedFieldCleanUp_description_old_field_declaration, MultiFixMessages.SingleUsedFieldCleanUp_description_uses_of_the_var)));
@@ -22725,7 +22725,7 @@ public void refactorFieldWithSameNameAsAttribute() {
 		enable(CleanUpConstants.SINGLE_USED_FIELD);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.SingleUsedFieldCleanUp_description_new_local_var_declaration,
 						MultiFixMessages.SingleUsedFieldCleanUp_description_old_field_declaration, MultiFixMessages.SingleUsedFieldCleanUp_description_uses_of_the_var)));
@@ -23798,7 +23798,7 @@ public Name methodWithStaticInnerInstanciation() {
 		enable(CleanUpConstants.STATIC_INNER_CLASS);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.StaticInnerClassCleanUp_description)));
 	}
@@ -23848,7 +23848,7 @@ public boolean anotherMethod() {
 		enable(CleanUpConstants.STATIC_INNER_CLASS);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.StaticInnerClassCleanUp_description)));
 	}
@@ -23914,7 +23914,7 @@ public boolean anotherMethod() {
 		enable(CleanUpConstants.STATIC_INNER_CLASS);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.StaticInnerClassCleanUp_description)));
 	}
@@ -24695,7 +24695,7 @@ public static String useStringBuilderWithNullableStart(String nullableString) {
 		enable(CleanUpConstants.STRINGBUILDER);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.StringBuilderCleanUp_description)));
 	}
@@ -24978,7 +24978,7 @@ public void refactorChained() {
 		enable(CleanUpConstants.PLAIN_REPLACEMENT);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.PlainReplacementCleanUp_description)));
 	}
@@ -25078,7 +25078,7 @@ public boolean isEnabled(String key) {
 		enable(CleanUpConstants.PLAIN_REPLACEMENT);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.PlainReplacementCleanUp_description)));
 	}
@@ -25449,7 +25449,7 @@ public void createBlockToPullDown(int number) {
 		enable(CleanUpConstants.CONTROLFLOW_MERGE);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.ControlFlowMergeCleanUp_description)));
 	}
@@ -25818,7 +25818,7 @@ public void mergeORConditions(boolean isValid, boolean isActive, boolean isEnabl
 		enable(CleanUpConstants.ONE_IF_RATHER_THAN_DUPLICATE_BLOCKS_THAT_FALL_THROUGH);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected }, new HashSet<>(Arrays.asList(MultiFixMessages.OneIfRatherThanDuplicateBlocksThatFallThroughCleanUp_description)));
 	}
 
@@ -26654,7 +26654,7 @@ public int moveIncrementInSwitch(int i, int discriminant) {
 		enable(CleanUpConstants.EXTRACT_INCREMENT);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.CodeStyleCleanUp_ExtractIncrement_description)));
 	}
@@ -27202,7 +27202,7 @@ public boolean useInstanceofOnQualifiedType(Object o) {
 		enable(CleanUpConstants.INSTANCEOF);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.CodeStyleCleanUp_Instanceof_description)));
 	}
@@ -28784,7 +28784,7 @@ public boolean invertEqualsIgnoreCase(String s) {
 		enable(CleanUpConstants.INVERT_EQUALS);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.InvertEqualsCleanUp_description)));
 	}
@@ -28937,7 +28937,7 @@ public boolean refactorComparatorComparingToZero(Comparator comparator)
 		enable(CleanUpConstants.STANDARD_COMPARISON);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.StandardComparisonCleanUp_description)));
 	}
@@ -30049,7 +30049,7 @@ public void simpleCase() {
 		enable(CleanUpConstants.CONSTANTS_FOR_SYSTEM_PROPERTY_JAVA_SPECIFICATION_VERSION);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(Messages.format(ConstantsCleanUp_description,UpdateProperty.FILE_SEPARATOR.toString()),
 						Messages.format(ConstantsCleanUp_description,UpdateProperty.PATH_SEPARATOR.toString()),
@@ -30113,7 +30113,7 @@ public void simpleCase() {
 		enable(CleanUpConstants.CONSTANTS_FOR_SYSTEM_PROPERTY_BOXED);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(Messages.format(ConstantsCleanUp_description,UpdateProperty.FILE_SEPARATOR.toString()),
 						Messages.format(ConstantsCleanUp_description,UpdateProperty.PATH_SEPARATOR.toString()),
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest11.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest11.java
index 3c2d848a631..9dcb1b8e5c1 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest11.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest11.java
@@ -566,7 +566,7 @@ void printList(List list) {
 		enable(CleanUpConstants.USE_STRING_IS_BLANK);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected }, new HashSet<>(Arrays.asList(FixMessages.UseStringIsBlankCleanUp_description)));
 	}
 
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest12.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest12.java
index fdbd10aa273..6115e78dba6 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest12.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest12.java
@@ -1072,7 +1072,7 @@ public int replaceMeltCases(int i1) {
 			}
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.CodeStyleCleanUp_Switch_description)));
 	}
@@ -1170,7 +1170,7 @@ private boolean computeit(String i) {
 }
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.CodeStyleCleanUp_Switch_description)));
 	}
@@ -1252,7 +1252,7 @@ private boolean computeit(MYENUM i) {
 }
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.CodeStyleCleanUp_Switch_description)));
 	}
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest16.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest16.java
index 738308b01a3..86c6f0d6629 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest16.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest16.java
@@ -273,7 +273,7 @@ public int matchPatternOnLoneStatement(Object object) {
 			}
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.PatternMatchingForInstanceofCleanup_description)));
 	}
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d4.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d4.java
index 501164ae9f4..ba30e270409 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d4.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d4.java
@@ -75,7 +75,7 @@ public class E1 implements Serializable {
 				+ "    private static final long serialVersionUID = 1L;\n" //
 				+ "}\n";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpectedIgnoreHashValue(new ICompilationUnit[] {cu}, new String[] {expected});
 	}
 
@@ -116,7 +116,7 @@ public class B2 extends B1 {
 				+ "    }\n" //
 				+ "}\n";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpectedIgnoreHashValue(new ICompilationUnit[] {cu}, new String[] {expected});
 	}
 
@@ -197,7 +197,7 @@ public void foo() {
 				+ "    }\n" //
 				+ "}\n";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpectedIgnoreHashValue(new ICompilationUnit[] {cu}, new String[] {expected});
 	}
 
@@ -235,7 +235,7 @@ public class E1 implements Serializable {
 				+ "    };\n" //
 				+ "}\n";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpectedIgnoreHashValue(new ICompilationUnit[] {cu}, new String[] {expected});
 	}
 
@@ -286,7 +286,7 @@ void foo2() {
 				+ "    }\n" //
 				+ "}\n";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpectedIgnoreHashValue(new ICompilationUnit[] {cu}, new String[] {expected});
 	}
 }
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d5.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d5.java
index 590a88289c6..35465010acd 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d5.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d5.java
@@ -119,7 +119,7 @@ public void m() {} // @Override error in 1.5, not in 1.6
 			}
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] {cu}, new String[] {expected}, null);
 	}
 
@@ -471,7 +471,7 @@ private String doSomething(String s) {
 			}
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.AddAllCleanup_description)));
 	}
@@ -2560,7 +2560,7 @@ public static Object doNotUseAutoboxingReturningObject() {
 		enable(CleanUpConstants.USE_AUTOBOXING);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.AutoboxingCleanup_description)));
 	}
@@ -2844,7 +2844,7 @@ public static String useUnboxingOnArrayAccess(String[] strings, Integer i) {
 		enable(CleanUpConstants.USE_UNBOXING);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.UnboxingCleanup_description)));
 	}
@@ -3197,7 +3197,7 @@ public void foo(Object elementsOrTreePaths, Integer obj) {
 			enable(CleanUpConstants.REMOVE_UNNECESSARY_ARRAY_CREATION);
 
 			// Then
-			assertNotEquals("The class must be changed", given, expected);
+			assertNotEquals("The class must be changed", expected, given);
 			assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 					new HashSet<>(Arrays.asList(FixMessages.UnusedCodeFix_RemoveUnnecessaryArrayCreation_description)));
 		} catch (Exception e) {
@@ -3245,7 +3245,7 @@ public class NLS {
 			enable(CleanUpConstants.REMOVE_UNNECESSARY_ARRAY_CREATION);
 
 			// Then
-			assertNotEquals("The class must be changed", given, expected);
+			assertNotEquals("The class must be changed", expected, given);
 			assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 					new HashSet<>(Arrays.asList(FixMessages.UnusedCodeFix_RemoveUnnecessaryArrayCreation_description)));
 		} catch (Exception e) {
@@ -3356,7 +3356,7 @@ public static void bar() {
 		enable(CleanUpConstants.REMOVE_UNNECESSARY_ARRAY_CREATION);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(FixMessages.UnusedCodeFix_RemoveUnnecessaryArrayCreation_description)));
 	}
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d6.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d6.java
index a659dcfe1f6..215cd5d6436 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d6.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d6.java
@@ -271,7 +271,7 @@ public void simpleCase() {
 		enable(CleanUpConstants.CONSTANTS_FOR_SYSTEM_PROPERTY_BOXED);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(Messages.format(ConstantsCleanUp_description,UpdateProperty.FILE_SEPARATOR.toString()),
 						Messages.format(ConstantsCleanUp_description,UpdateProperty.PATH_SEPARATOR.toString()),
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d7.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d7.java
index 510797de735..176fcb53fdb 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d7.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d7.java
@@ -568,7 +568,7 @@ public void refactorNullInitializedResourceDoNotRemoveFinally() throws Exception
 			}
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.TryWithResourceCleanup_description)));
 	}
@@ -959,7 +959,7 @@ private String throwingMethod() throws EA, EB1, EB, EC {
 		enable(CleanUpConstants.MULTI_CATCH);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.MultiCatchCleanUp_description)));
 	}
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d8.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d8.java
index 605b63d4a4e..c05424797d1 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d8.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d8.java
@@ -1916,7 +1916,7 @@ public static Function useTypeReferenceQualifyingInherit
 		enable(CleanUpConstants.SIMPLIFY_LAMBDA_EXPRESSION_AND_METHOD_REF);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.LambdaExpressionAndMethodRefCleanUp_description)));
 	}
@@ -1967,7 +1967,7 @@ public void foo() {
 		enable(CleanUpConstants.SIMPLIFY_LAMBDA_EXPRESSION_AND_METHOD_REF);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.LambdaExpressionAndMethodRefCleanUp_description)));
 	}
@@ -2096,7 +2096,7 @@ void test() {
 		enable(CleanUpConstants.SIMPLIFY_LAMBDA_EXPRESSION_AND_METHOD_REF);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.LambdaExpressionAndMethodRefCleanUp_description)));
 	}
@@ -2155,7 +2155,7 @@ void test() {
 		enable(CleanUpConstants.SIMPLIFY_LAMBDA_EXPRESSION_AND_METHOD_REF);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu, cu1 }, new String[] { expected, given1 },
 				new HashSet<>(Arrays.asList(MultiFixMessages.LambdaExpressionAndMethodRefCleanUp_description)));
 	}
@@ -2211,7 +2211,7 @@ void test() {
 		enable(CleanUpConstants.SIMPLIFY_LAMBDA_EXPRESSION_AND_METHOD_REF);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu, cu1 }, new String[] { expected, given1 },
 				new HashSet<>(Arrays.asList(MultiFixMessages.LambdaExpressionAndMethodRefCleanUp_description)));
 	}
@@ -2267,7 +2267,7 @@ void test() {
 		enable(CleanUpConstants.SIMPLIFY_LAMBDA_EXPRESSION_AND_METHOD_REF);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu, cu1 }, new String[] { expected, given1 },
 				new HashSet<>(Arrays.asList(MultiFixMessages.LambdaExpressionAndMethodRefCleanUp_description)));
 	}
@@ -2323,7 +2323,7 @@ void test() {
 		enable(CleanUpConstants.SIMPLIFY_LAMBDA_EXPRESSION_AND_METHOD_REF);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu, cu1 }, new String[] { expected, given1 },
 				new HashSet<>(Arrays.asList(MultiFixMessages.LambdaExpressionAndMethodRefCleanUp_description)));
 	}
@@ -2399,7 +2399,7 @@ default boolean exists_testOpen() {
 		enable(CleanUpConstants.SIMPLIFY_LAMBDA_EXPRESSION_AND_METHOD_REF);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.LambdaExpressionAndMethodRefCleanUp_description)));
 	}
@@ -3198,7 +3198,7 @@ public class FooBar {
 		enable(CleanUpConstants.COMPARING_ON_CRITERIA);
 
 		// Then
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.ComparingOnCriteriaCleanUp_description)));
 	}
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest9.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest9.java
index 38be9055c54..2a1c0380508 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest9.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest9.java
@@ -216,7 +216,7 @@ public void refactorNullInitializedResourceDoNotRemoveFinally() throws Exception
 			}
 			""";
 
-		assertNotEquals("The class must be changed", given, expected);
+		assertNotEquals("The class must be changed", expected, given);
 		assertRefactoringResultAsExpected(new ICompilationUnit[] { cu }, new String[] { expected },
 				new HashSet<>(Arrays.asList(MultiFixMessages.TryWithResourceCleanup_description)));
 	}
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest.java
index 8045fba48b6..3b63084094f 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest.java
@@ -18,7 +18,6 @@
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 
 import java.util.ArrayList;
 import java.util.Hashtable;
@@ -145,7 +144,7 @@ public void testCreateClass1() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			/**
 			 * Type
 			 */
@@ -187,9 +186,9 @@ public void testCreateClass2() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			import java.util.ArrayList;
-			
+
 			/**
 			 * Type
 			 */
@@ -241,14 +240,14 @@ public class A {
 			 * File
 			 */
 			package test1;
-			
+
 			import pack.A;
-			
+
 			/**
 			 * Type
 			 */
 			public class E extends A {
-			
+
 			    /**
 			     * Overridden
 			     */
@@ -303,14 +302,14 @@ public class A {
 			 * File
 			 */
 			package test1;
-			
+
 			import pack.A;
-			
+
 			/**
 			 * Type
 			 */
 			public class E extends A {
-			
+
 			    /**
 			     * Constructor
 			     */
@@ -318,12 +317,12 @@ public E(String t) {
 			        super(t);
 			    }
 			    /* class body */
-			
+
 			    /**
 			     * Method
 			     */
 			    public static void main(String[] args) {
-			
+
 			    }
 			}
 			""";
@@ -370,9 +369,9 @@ public class A {
 
 		String expected= """
 			package pack;
-			
+
 			import java.util.ArrayList;
-			
+
 			public class A {
 			    /**
 			     * Type
@@ -380,7 +379,7 @@ public class A {
 			    public class E extends ArrayList {
 			        /* class body */
 			    }
-			
+
 			    public abstract void foo(T t);
 			}
 			""";
@@ -423,11 +422,11 @@ public void testCreateClassExtraImports1() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			import java.io.File;
 			import java.util.List;
 			import java.util.Map;
-			
+
 			/**
 			 * Type
 			 */
@@ -486,16 +485,16 @@ public static class Inner {
 			 * File
 			 */
 			package test1;
-			
+
 			import java.util.Map;
-			
+
 			import pack.A;
-			
+
 			/**
 			 * Type
 			 */
 			public class E extends A {
-			
+
 			    /**
 			     * Overridden
 			     */
@@ -526,9 +525,9 @@ public static class Inner {
 		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
 		String str1= """
 			package test1;
-			
+
 			import java.util.Map;
-			
+
 			public class B {
 			}
 			""";
@@ -558,18 +557,18 @@ public class B {
 
 		String expected= """
 			package test1;
-			
+
 			import java.util.Map;
-			
+
 			import pack.A;
-			
+
 			public class B {
-			
+
 			    /**
 			     * Type
 			     */
 			    public class E extends A {
-			
+
 			        /**
 			         * Overridden
 			         */
@@ -612,9 +611,9 @@ public void testCreateInterface() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			import java.util.List;
-			
+
 			/**
 			 * Type
 			 */
@@ -652,7 +651,7 @@ public void testCreateEnum() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			/**
 			 * Type
 			 */
@@ -690,7 +689,7 @@ public void testCreateAnnotation() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			/**
 			 * Type
 			 */
@@ -811,9 +810,9 @@ public void testAttemptCreateExistingClass() throws Exception
 		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
 		String str= """
 			package test1;
-			
+
 			public class Foo1 {
-			
+
 			}
 			""";
 		ICompilationUnit cu= pack1.createCompilationUnit("Foo1.java", str, false, null);
@@ -823,9 +822,9 @@ public class Foo1 {
 		pack1= fSourceFolder.createPackageFragment("test2", false, null);
 		String str1= """
 			package test2;
-			
+
 			public class Foo3 {
-			
+
 			}
 			""";
 		pack1.createCompilationUnit("Foo3.java", str1, false, null);
@@ -849,7 +848,7 @@ public void testAddFinalSuperClassError1() throws Exception {
 		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
 		String test= """
 			package test1;
-			
+
 			public final class A{
 			}
 			""";
@@ -873,8 +872,8 @@ public final class A{
 
 		IStatus status= wizardPage.getSuperClassStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(expected.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(expected, status.getMessage());
 	}
 
 	private static ITypeBinding getTypeBinding(ICompilationUnit cu) {
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest17.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest17.java
index 7cdee2accae..ed08713fe11 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest17.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest17.java
@@ -15,7 +15,7 @@
 package org.eclipse.jdt.ui.tests.wizardapi;
 
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
 
 import java.util.ArrayList;
 import java.util.Hashtable;
@@ -122,14 +122,14 @@ private void initNonModularProject() throws Exception {
 		fpack1= fSourceFolder.createPackageFragment("test1", false, null);
 		String test= """
 			package test;
-			
+
 			public sealed class Shape permits Square {
 			}
 			""";
 		fSealedSuperCls= fpack1.createCompilationUnit("Shape.java", test, false, null);
 		test= """
 			package test;
-			
+
 			public non-sealed class Square extends Shape {
 			}
 			""";
@@ -137,14 +137,14 @@ public non-sealed class Square extends Shape {
 		fSealedClsBinding= getTypeBinding(fSealedSuperCls);
 		test= """
 			package test;
-			
+
 			public sealed interface IShape permits ISquare {
 			}
 			""";
 		fSealedSuperInterface= fpack1.createCompilationUnit("IShape.java", test, false, null);
 		test= """
 			package test;
-			
+
 			public non-sealed interface ISquare extends IShape {
 			}
 			""";
@@ -159,14 +159,14 @@ private void initModularProject() throws Exception {
 		fMpack1= fMSourceFolder.createPackageFragment("test1", false, null);
 		String test= """
 			package test;
-			
+
 			public sealed class Shape permits Square {
 			}
 			""";
 		fMSealedSuperCls= fMpack1.createCompilationUnit("Shape.java", test, false, null);
 		test= """
 			package test;
-			
+
 			public non-sealed class Square extends Shape {
 			}
 			""";
@@ -174,14 +174,14 @@ public non-sealed class Square extends Shape {
 		fMSealedClsBinding= getTypeBinding(fMSealedSuperCls);
 		test= """
 			package test;
-			
+
 			public sealed interface IShape permits ISquare {
 			}
 			""";
 		fMSealedSuperInterface= fMpack1.createCompilationUnit("IShape.java", test, false, null);
 		test= """
 			package test;
-			
+
 			public non-sealed interface ISquare extends IShape {
 			}
 			""";
@@ -204,8 +204,8 @@ private void initSecondProject() throws Exception {
 
 	private void createModuleInfo() throws Exception {
 		String test= """
-			
-			
+
+
 			module modTest1 {
 				exports test1;
 			}
@@ -220,8 +220,8 @@ private void initSecondModularProject() throws Exception {
 		fMSourceFolder= JavaProjectHelper.addSourceContainer(fJProjectM2, "src");
 		fMpack1= fMSourceFolder.createPackageFragment("test3", false, null);
 		String test= """
-			
-			
+
+
 			module modTest2 {
 				requires modTest2;
 			}
@@ -276,8 +276,8 @@ public void testNonModularCreateClassError1() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperClassStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_class_SealedSuperClassInDifferentPackage.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_class_SealedSuperClassInDifferentPackage, status.getMessage());
 	}
 
 	// Throw error if the sealed super interface is in different package to the new class
@@ -301,8 +301,8 @@ public void testNonModularCreateClassError2() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperInterfaceStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_class_SealedSuperInterfaceInDifferentPackage.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_class_SealedSuperInterfaceInDifferentPackage, status.getMessage());
 	}
 
 	// Throw error if the sealed super interface is in different package to the new interface
@@ -325,8 +325,8 @@ public void testNonModularCreateInterfaceError1() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperInterfaceStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_interface_SealedSuperInterfaceInDifferentPackage.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_interface_SealedSuperInterfaceInDifferentPackage, status.getMessage());
 	}
 
 	// Successfully Create non-sealed class which has sealed super class
@@ -350,17 +350,17 @@ public void testNonModularCreateClassSuccess1() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperClassStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_extend_superclass_notSelected_message.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_extend_superclass_notSelected_message, status.getMessage());
 		int modifiers= wizardPage.getModifiers();
 		wizardPage.setModifiers(modifiers | Flags.AccNonSealed, true);
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		wizardPage.createType(null);
 
@@ -371,7 +371,7 @@ public void testNonModularCreateClassSuccess1() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			/**
 			 * Type
 			 */
@@ -386,7 +386,7 @@ public non-sealed class E extends Shape {
 
 		expected= """
 			package test;
-			
+
 			public sealed class Shape permits Square, E {
 			}
 			""";
@@ -414,17 +414,17 @@ public void testNonModularCreateClassSuccess2() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperInterfaceStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_implement_superinterface_notSelected_message.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_implement_superinterface_notSelected_message, status.getMessage());
 		int modifiers= wizardPage.getModifiers();
 		wizardPage.setModifiers(modifiers | Flags.AccNonSealed, true);
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		wizardPage.createType(null);
 
@@ -435,7 +435,7 @@ public void testNonModularCreateClassSuccess2() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			/**
 			 * Type
 			 */
@@ -450,7 +450,7 @@ public non-sealed class E implements IShape {
 
 		expected= """
 			package test;
-			
+
 			public sealed interface IShape permits ISquare, E {
 			}
 			""";
@@ -479,17 +479,17 @@ public void testNonModularCreateClassSuccess3() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperClassStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_extend_superclass_notSelected_message.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_extend_superclass_notSelected_message, status.getMessage());
 		int modifiers= wizardPage.getModifiers();
 		wizardPage.setModifiers(modifiers | Flags.AccFinal, true);
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		wizardPage.createType(null);
 
@@ -500,7 +500,7 @@ public void testNonModularCreateClassSuccess3() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			/**
 			 * Type
 			 */
@@ -515,7 +515,7 @@ public final class E extends Shape {
 
 		expected= """
 			package test;
-			
+
 			public sealed class Shape permits Square, E {
 			}
 			""";
@@ -543,17 +543,17 @@ public void testNonModularCreateClassSuccess4() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperInterfaceStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_implement_superinterface_notSelected_message.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_implement_superinterface_notSelected_message, status.getMessage());
 		int modifiers= wizardPage.getModifiers();
 		wizardPage.setModifiers(modifiers | Flags.AccFinal, true);
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		wizardPage.createType(null);
 
@@ -564,7 +564,7 @@ public void testNonModularCreateClassSuccess4() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			/**
 			 * Type
 			 */
@@ -579,7 +579,7 @@ public final class E implements IShape {
 
 		expected= """
 			package test;
-			
+
 			public sealed interface IShape permits ISquare, E {
 			}
 			""";
@@ -606,17 +606,17 @@ public void testNonModularCreateInterfaceSuccess1() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperInterfaceStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedInterface_extend_superinterface_notSelected_message.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedInterface_extend_superinterface_notSelected_message, status.getMessage());
 		int modifiers= wizardPage.getModifiers();
 		wizardPage.setModifiers(modifiers | Flags.AccNonSealed, true);
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		wizardPage.createType(null);
 
@@ -627,7 +627,7 @@ public void testNonModularCreateInterfaceSuccess1() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			/**
 			 * Type
 			 */
@@ -642,7 +642,7 @@ public non-sealed interface IE extends IShape {
 
 		expected= """
 			package test;
-			
+
 			public sealed interface IShape permits ISquare, IE {
 			}
 			""";
@@ -677,8 +677,8 @@ public void testNonModularDependantCreateClassError1() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperClassStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_class_SealedSuperClassInDifferentProject.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_class_SealedSuperClassInDifferentProject, status.getMessage());
 	}
 
 	// Throw error if the sealed super interface is in different project to the new class
@@ -703,8 +703,8 @@ public void testNonModularDependantCreateClassError2() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperInterfaceStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_class_SealedSuperInterfaceInDifferentProject.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_class_SealedSuperInterfaceInDifferentProject, status.getMessage());
 	}
 
 	// Throw error if the sealed super interface is in different project to the new interface
@@ -728,8 +728,8 @@ public void testNonModularDependantCreateInterfaceError1() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperInterfaceStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_interface_SealedSuperInterfaceInDifferentProject.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_interface_SealedSuperInterfaceInDifferentProject, status.getMessage());
 	}
 
 
@@ -761,17 +761,17 @@ public void testModularCreateClassSuccess1() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperClassStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_extend_superclass_notSelected_message.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_extend_superclass_notSelected_message, status.getMessage());
 		int modifiers= wizardPage.getModifiers();
 		wizardPage.setModifiers(modifiers | Flags.AccNonSealed, true);
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		wizardPage.createType(null);
 
@@ -782,9 +782,9 @@ public void testModularCreateClassSuccess1() throws Exception {
 			 * File
 			 */
 			package test2;
-			
+
 			import test1.Shape;
-			
+
 			/**
 			 * Type
 			 */
@@ -799,9 +799,9 @@ public non-sealed class E extends Shape {
 
 		expected= """
 			package test;
-			
+
 			import test2.E;
-			
+
 			public sealed class Shape permits Square, E {
 			}
 			""";
@@ -832,17 +832,17 @@ public void testModularCreateClassSuccess2() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperInterfaceStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_implement_superinterface_notSelected_message.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_implement_superinterface_notSelected_message, status.getMessage());
 		int modifiers= wizardPage.getModifiers();
 		wizardPage.setModifiers(modifiers | Flags.AccNonSealed, true);
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		wizardPage.createType(null);
 
@@ -853,9 +853,9 @@ public void testModularCreateClassSuccess2() throws Exception {
 			 * File
 			 */
 			package test2;
-			
+
 			import test1.IShape;
-			
+
 			/**
 			 * Type
 			 */
@@ -870,9 +870,9 @@ public non-sealed class E implements IShape {
 
 		expected= """
 			package test;
-			
+
 			import test2.E;
-			
+
 			public sealed interface IShape permits ISquare, E {
 			}
 			""";
@@ -904,17 +904,17 @@ public void testModularCreateClassSuccess3() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperClassStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_extend_superclass_notSelected_message.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_extend_superclass_notSelected_message, status.getMessage());
 		int modifiers= wizardPage.getModifiers();
 		wizardPage.setModifiers(modifiers | Flags.AccFinal, true);
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		wizardPage.createType(null);
 
@@ -925,9 +925,9 @@ public void testModularCreateClassSuccess3() throws Exception {
 			 * File
 			 */
 			package test2;
-			
+
 			import test1.Shape;
-			
+
 			/**
 			 * Type
 			 */
@@ -942,9 +942,9 @@ public final class E extends Shape {
 
 		expected= """
 			package test;
-			
+
 			import test2.E;
-			
+
 			public sealed class Shape permits Square, E {
 			}
 			""";
@@ -975,17 +975,17 @@ public void testModularCreateClassSuccess4() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperInterfaceStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_implement_superinterface_notSelected_message.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedClass_implement_superinterface_notSelected_message, status.getMessage());
 		int modifiers= wizardPage.getModifiers();
 		wizardPage.setModifiers(modifiers | Flags.AccFinal, true);
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		wizardPage.createType(null);
 
@@ -996,9 +996,9 @@ public void testModularCreateClassSuccess4() throws Exception {
 			 * File
 			 */
 			package test2;
-			
+
 			import test1.IShape;
-			
+
 			/**
 			 * Type
 			 */
@@ -1013,9 +1013,9 @@ public final class E implements IShape {
 
 		expected= """
 			package test;
-			
+
 			import test2.E;
-			
+
 			public sealed interface IShape permits ISquare, E {
 			}
 			""";
@@ -1045,17 +1045,17 @@ public void testModularCreateInterfaceSuccess1() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperInterfaceStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedInterface_extend_superinterface_notSelected_message.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_SealedFinalNonSealedInterface_extend_superinterface_notSelected_message, status.getMessage());
 		int modifiers= wizardPage.getModifiers();
 		wizardPage.setModifiers(modifiers | Flags.AccNonSealed, true);
 		status= wizardPage.getSealedModifierStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.OK);
+		assertEquals(IStatus.OK, status.getSeverity());
 
 		wizardPage.createType(null);
 
@@ -1066,9 +1066,9 @@ public void testModularCreateInterfaceSuccess1() throws Exception {
 			 * File
 			 */
 			package test2;
-			
+
 			import test1.IShape;
-			
+
 			/**
 			 * Type
 			 */
@@ -1083,9 +1083,9 @@ public non-sealed interface IE extends IShape {
 
 		expected= """
 			package test;
-			
+
 			import test2.IE;
-			
+
 			public sealed interface IShape permits ISquare, IE {
 			}
 			""";
@@ -1120,8 +1120,8 @@ public void testModularDependentCreateClassError1() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperClassStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_class_SealedSuperClassInDifferentModule.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_class_SealedSuperClassInDifferentModule, status.getMessage());
 	}
 
 	// Throw error if the sealed super interface is in different module to the new class
@@ -1146,8 +1146,8 @@ public void testModularDependentCreateClassError2() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperInterfaceStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_class_SealedSuperInterfaceInDifferentModule.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_class_SealedSuperInterfaceInDifferentModule, status.getMessage());
 	}
 
 	// Throw error if the sealed super interface is in different module to the new interface
@@ -1171,8 +1171,8 @@ public void testModularDependentCreateInterfaceError1() throws Exception {
 
 		IStatus status= wizardPage.getSealedSuperInterfaceStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(NewWizardMessages.NewTypeWizardPage_error_interface_SealedSuperInterfaceInDifferentModule.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(NewWizardMessages.NewTypeWizardPage_error_interface_SealedSuperInterfaceInDifferentModule, status.getMessage());
 	}
 
 	@Test
@@ -1182,7 +1182,7 @@ public void testAddRecordSuperClassError1() throws Exception {
 		fpack1= fSourceFolder.createPackageFragment("test1", false, null);
 		String test= """
 			package test;
-			
+
 			public record Rec1(int x){
 			}
 			""";
@@ -1209,8 +1209,8 @@ public record Rec1(int x){
 
 		IStatus status= wizardPage.getSuperClassStatus();
 		assertNotNull(status);
-		assertTrue(status.getSeverity() == IStatus.ERROR);
-		assertTrue(expected.equals(status.getMessage()));
+		assertEquals(IStatus.ERROR, status.getSeverity());
+		assertEquals(expected, status.getMessage());
 	}
 
 	@Test
@@ -1242,12 +1242,12 @@ public void testCreateRecordWithAbstractMethodStubs() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			/**
 			 * Type
 			 */
 			public record Rec1() {
-			
+
 			    /**
 			     * Overridden
 			     */
@@ -1255,7 +1255,7 @@ public record Rec1() {
 			    public boolean equals(Object arg0) {
 			        return false;
 			    }
-			
+
 			    /**
 			     * Overridden
 			     */
@@ -1263,7 +1263,7 @@ public boolean equals(Object arg0) {
 			    public int hashCode() {
 			        return 0;
 			    }
-			
+
 			    /**
 			     * Overridden
 			     */
@@ -1271,7 +1271,7 @@ public int hashCode() {
 			    public String toString() {
 			        return null;
 			    }
-			
+
 			}""" ;
 
 		StringAsserts.assertEqualStringIgnoreDelim(actual, expected);
@@ -1306,12 +1306,12 @@ public void testCreateRecordWithOutAbstractMethodStubsAndMain() throws Exception
 			 * File
 			 */
 			package test1;
-			
+
 			/**
 			 * Type
 			 */
 			public record Rec1() {
-			
+
 			}""" ;
 
 		StringAsserts.assertEqualStringIgnoreDelim(actual, expected);
@@ -1346,19 +1346,19 @@ public void testCreateRecordWithMain() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			/**
 			 * Type
 			 */
 			public record Rec1() {
-			
+
 			    /**
 			     * Method
 			     */
 			    public static void main(String[] args) {
-			
+
 			    }
-			
+
 			}""" ;
 
 		StringAsserts.assertEqualStringIgnoreDelim(actual, expected);
@@ -1393,12 +1393,12 @@ public void testCreateRecordWithAbstractMethodStubsAndMain() throws Exception {
 			 * File
 			 */
 			package test1;
-			
+
 			/**
 			 * Type
 			 */
 			public record Rec1() {
-			
+
 			    /**
 			     * Overridden
 			     */
@@ -1406,7 +1406,7 @@ public record Rec1() {
 			    public boolean equals(Object arg0) {
 			        return false;
 			    }
-			
+
 			    /**
 			     * Overridden
 			     */
@@ -1414,7 +1414,7 @@ public boolean equals(Object arg0) {
 			    public int hashCode() {
 			        return 0;
 			    }
-			
+
 			    /**
 			     * Overridden
 			     */
@@ -1422,14 +1422,14 @@ public int hashCode() {
 			    public String toString() {
 			        return null;
 			    }
-			
+
 			    /**
 			     * Method
 			     */
 			    public static void main(String[] args) {
-			
+
 			    }
-			
+
 			}""" ;
 
 		StringAsserts.assertEqualStringIgnoreDelim(actual, expected);