Add MutabilityDetector

This commit is contained in:
Grzegorz Piwowarek 2016-07-30 12:22:43 +02:00
parent 591e3507fb
commit 7b1c77c6bc
2 changed files with 9 additions and 0 deletions

View File

@ -26,6 +26,12 @@
<version>3.5.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mutabilitydetector</groupId>
<artifactId>MutabilityDetector</artifactId>
<version>0.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>

View File

@ -3,6 +3,7 @@ package com.baeldung.immutable;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mutabilitydetector.unittesting.MutabilityAssert.assertImmutable;
public class ImmutablePersonTest {
@ -20,5 +21,7 @@ public class ImmutablePersonTest {
assertThat(john.getAge())
.isEqualTo(42);
assertImmutable(com.baeldung.immutable.ImmutablePerson.class);
}
}