/*
 * Mutability Detector
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 *
 * Further licensing information for this project can be found in 
 * 		license/LICENSE.txt
 */

package org.mutabilitydetector;

import static org.mutabilitydetector.unittesting.MutabilityAssert.assertInstancesOf;
import static org.mutabilitydetector.unittesting.matchers.MutabilityMatchers.areImmutable;
import static org.mutabilitydetector.unittesting.matchers.MutabilityMatchers.areNotImmutable;

import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;

import org.junit.Ignore;
import org.junit.Test;

public class WellKnownJavaTypesTest {
	
	@Ignore("Not final " +
			"Reassigned field " +
			"Mutable type to field (BigInteger, String)")
	@Test public void BigDecimal() {
		assertInstancesOf(BigDecimal.class, areImmutable());
	}
	
	@Ignore("Not final" +
			"Published fields can be reassigned" +
			"Reassigning field" +
			"Mutable type to field (primitive array)" +
			"Field which is a mutable type")
	@Test public void BigInteger() {
		assertInstancesOf(BigInteger.class, areImmutable());
	}
	
	@Ignore("Mutable type to field (primitive array)" +
			"Field which is a mutable type")
	@Test public void String() {
		assertInstancesOf(String.class, areImmutable());
	}
	
	@Test public void Integer() {
		assertInstancesOf(Integer.class, areImmutable());
	}
	
	@Test public void Array() {
		assertInstancesOf(Array.class, areImmutable());
	}
	
	@Test public void primitive_int() {
		assertInstancesOf(int.class, areImmutable());
	}
	
	@Test public void Date() {
		assertInstancesOf(Date.class, areNotImmutable());
	}
	
}
@@ -668,20 +668,96 @@
 va.util.
-Date
+AbstractMap;%0Aimport java.util.Date;%0A%0Aimport javax.management.ImmutableDescriptor
 ;%0A%0Aimpor
@@ -1821,9 +1821,518 @@
 );%0A%09%7D%0A%09%0A
+%09@Ignore(%22Not final%22 +%0A%09%09%09%22Mutable type to field (java.lang.Object)%22)%0A%09@Test public void AbstractMap$SimpleImmutableEntry() %7B%0A%09%09assertInstancesOf(AbstractMap.SimpleImmutableEntry.class, areImmutable());%0A%09%7D%0A%09%0A%09@Ignore(%22Not final%22 +%0A%09%09%09%22Field hashCode reassigned%22 +%0A%09%09%09%22Field of mutable type (primitive array)%22)%0A%09@Test public void ImmutableDescriptor() %7B%0A%09%09assertInstancesOf(ImmutableDescriptor.class, areImmutable());%0A%09%7D%0A%09%0A%09@Test public void Class() %7B%0A%09%09assertInstancesOf(Class.class, areNotImmutable());%0A%09%7D%0A%09%0A
 %7D

Add another couple of JDK classes.