Add MutabilityDetector
This commit is contained in:
parent
591e3507fb
commit
7b1c77c6bc
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue