package com.github.grundlefleck;

import static org.junit.Assert.assertEquals;
import static org.mutabilitydetector.unittesting.MutabilityAssert.assertImmutable;

import org.junit.Test;

public class CarTest {

	@Test
	public void testRecompilationWithNewProperties() {
		// Not the kind of tests you would normally write,
		// included here just to see how the IDE handles changes.
		Car instanceOfCar = Car.create("Ford Focus");
		assertEquals(instanceOfCar.model(), "Ford Focus");
		assertEquals(instanceOfCar.numWheels(), 4);
	}

	@Test
	public void isImmutable() {
		assertImmutable(Car.create("Ferrari").getClass());
	}
}

@@ -125,64 +125,483 @@
 ing.
-MutabilityAssert.assertImmutable;%0A%0Aimport org.junit.Test
+AllowedReason.provided;%0Aimport static org.mutabilitydetector.unittesting.MutabilityAssert.assertImmutable;%0Aimport static org.mutabilitydetector.unittesting.MutabilityAssert.assertInstancesOf;%0Aimport static org.mutabilitydetector.unittesting.MutabilityMatchers.areImmutable;%0A%0Aimport org.junit.Test;%0Aimport org.mutabilitydetector.unittesting.AllowedReason;%0Aimport org.mutabilitydetector.unittesting.MutabilityAssert;%0Aimport org.mutabilitydetector.unittesting.MutabilityMatchers
 ;%0A%0Ap
@@ -986,25 +986,33 @@
 ) %7B%0A
-%09%09assertImmutable
+        assertInstancesOf
 (Car
@@ -1040,16 +1040,80 @@
 tClass()
+, areImmutable(), provided(Registration.class).isAlsoImmutable()
 );%0A%09%7D%0A%7D%0A

Make tests pass by assuming Registration class is also immutable.