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..83fdd251251 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 @@ -14,7 +14,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; import java.util.Arrays; import java.util.List; @@ -102,9 +101,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"); - } + org.junit.Assert.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..d8f3e303b7a 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 @@ -14,7 +14,6 @@ package org.eclipse.jdt.ui.tests.refactoring; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; import org.junit.Test; import org.junit.runner.RunWith; @@ -62,7 +61,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())); + org.junit.Assert.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..6fa921f8bcb 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 @@ -164,10 +164,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!"); + org.junit.Assert.assertFalse("No selection start comment in input source file!", begin < SELECTION_START_HERALD.length()); + org.junit.Assert.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..7acc244c24e 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 @@ -154,14 +154,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)); + org.junit.Assert.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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_constructors); } @Test @@ -197,46 +197,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)); + org.junit.Assert.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)); + org.junit.Assert.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)); + org.junit.Assert.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)); + org.junit.Assert.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)); + org.junit.Assert.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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_super_method_invocations); } @Test @@ -244,14 +240,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)); + org.junit.Assert.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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_recursive_methods); } @Test @@ -265,8 +261,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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_duplicate_method_signature); } @Test @@ -280,8 +275,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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_method_already_static); } @Test @@ -353,16 +347,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)); + org.junit.Assert.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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_wildCardTypes_as_bound); } @Test @@ -419,8 +411,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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_selected_method_uses_super_field_access); } @Test @@ -455,8 +446,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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_method_references); } @Test @@ -477,8 +467,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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_explicit_super_method_invocation); } @Test @@ -492,8 +481,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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_selected_method_uses_super_field_access); } @Test @@ -505,8 +493,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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_source_not_available_for_selected_method); } @Test @@ -527,8 +514,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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_method_references); } @Test @@ -541,32 +527,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)); + org.junit.Assert.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)); + org.junit.Assert.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)); + org.junit.Assert.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)); + org.junit.Assert.assertEquals(status.getEntryWithHighestSeverity().getMessage(), RefactoringCoreMessages.MakeStaticRefactoring_not_available_for_method_references); } @Test 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..f6f213b73f0 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,6 @@ package org.eclipse.jdt.ui.tests.hover; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -204,7 +203,7 @@ int check (String value, String[] strings) { // value should be expanded: int index= actualHtmlContent.indexOf("
");
-			assertFalse(index == -1);
+			org.junit.Assert.assertNotEquals(-1, index);
 			String actualSnippet= actualHtmlContent.substring(index, index + expectedCodeSequence.length());
 			assertEquals("sequence doesn't match", expectedCodeSequence, actualSnippet);
 		}
@@ -255,7 +254,7 @@ int check (String value, String[] strings) {
 
 			// value should be expanded:
 			int index= actualHtmlContent.indexOf("
{");
-			assertFalse(index == -1);
+			org.junit.Assert.assertNotEquals(-1, index);
 			String actualSnippet= actualHtmlContent.substring(index, index + expectedCodeSequence.length());
 			assertEquals("sequence doesn't match", expectedCodeSequence, actualSnippet);
 		}
@@ -319,7 +318,7 @@ int check (String value, String[] strings) {
 
 			// value should be expanded:
 			int index= actualHtmlContent.indexOf("
");
-			assertFalse(index == -1);
+			org.junit.Assert.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)));
 	}