commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1235494 - in /commons/sandbox/beanutils2/trunk/src: main/java/org/apache/commons/beanutils2/TypeUtils.java test/java/org/apache/commons/beanutils2/TypeUtilsTest.java
Date Tue, 24 Jan 2012 21:00:33 GMT
Author: simonetripodi
Date: Tue Jan 24 21:00:33 2012
New Revision: 1235494

URL: http://svn.apache.org/viewvc?rev=1235494&view=rev
Log:
[SANDBOX-362] added TypeUtils test - patch provided by Benedikt Ritter

Added:
    commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/TypeUtilsTest.java   (with props)
Modified:
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/TypeUtils.java

Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/TypeUtils.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/TypeUtils.java?rev=1235494&r1=1235493&r2=1235494&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/TypeUtils.java (original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/TypeUtils.java Tue Jan 24 21:00:33 2012
@@ -18,6 +18,8 @@ package org.apache.commons.beanutils2;
  * limitations under the License.
  */
 
+import static org.apache.commons.beanutils2.Assertions.checkNotNull;
+
 final class TypeUtils
 {
 
@@ -41,13 +43,15 @@ final class TypeUtils
      * Now logic widening matches are allowed.
      * For example, a <code>Long</code> will not match a <code>int</code>.
      *
-     * @param parameterType the type of parameter accepted by the method
-     * @param parameterization the type of parameter being tested
+     * @param parameterType the type of parameter accepted by the method. Must not be {@code null}!
+     * @param parameterization the type of parameter being tested. Must not be {@code null}!
      *
      * @return true if the assignement is compatible.
      */
     public static final boolean isAssignmentCompatible( Class<?> parameterType, Class<?> parameterization )
     {
+        parameterType = checkNotNull( parameterType, "parameterType must not be null!" );
+        parameterization = checkNotNull( parameterization, "parameterization must not be null!" );
         // try plain assignment
         if ( parameterType.isAssignableFrom( parameterization ) )
         {
@@ -159,13 +163,14 @@ final class TypeUtils
     }
 
     /**
-     * Find a non primitive representation for given primitive class.
+     * Finds a non primitive representation for given primitive class.
      *
-     * @param clazz the class to find a representation for, not null
+     * @param clazz the class to find a representation for. Must not be {@code null}!
      * @return the original class if it not a primitive. Otherwise the wrapper class. Not null
      */
     public static Class<?> toNonPrimitiveClass( Class<?> clazz )
     {
+        clazz = checkNotNull(clazz, "Parameter clazz must not be null!");
         if ( clazz.isPrimitive() )
         {
             Class<?> primitiveClazz = getPrimitiveWrapper( clazz );

Added: commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/TypeUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/TypeUtilsTest.java?rev=1235494&view=auto
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/TypeUtilsTest.java (added)
+++ commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/TypeUtilsTest.java Tue Jan 24 21:00:33 2012
@@ -0,0 +1,1862 @@
+package org.apache.commons.beanutils2;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import static org.apache.commons.beanutils2.TypeUtils.getPrimitiveType;
+import static org.apache.commons.beanutils2.TypeUtils.getPrimitiveWrapper;
+import static org.apache.commons.beanutils2.TypeUtils.isAssignmentCompatible;
+import static org.apache.commons.beanutils2.TypeUtils.toNonPrimitiveClass;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class TypeUtilsTest
+{
+
+    @Test
+    public void isAssignmentCompatibleBooleanPrimitiveBoolean()
+    {
+        assertTrue( isAssignmentCompatible( boolean.class, Boolean.class ) );
+        assertTrue( isAssignmentCompatible( boolean.class, Boolean.TYPE ) );
+        assertTrue( isAssignmentCompatible( boolean.class, boolean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanPrimitiveByte()
+    {
+        assertFalse( isAssignmentCompatible( boolean.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( boolean.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( boolean.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanPrimitiveShort()
+    {
+        assertFalse( isAssignmentCompatible( boolean.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( boolean.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( boolean.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanPrimitiveInteger()
+    {
+        assertFalse( isAssignmentCompatible( boolean.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( boolean.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( boolean.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanPrimitiveLong()
+    {
+        assertFalse( isAssignmentCompatible( boolean.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( boolean.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( boolean.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanPrimitveFloat()
+    {
+        assertFalse( isAssignmentCompatible( boolean.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( boolean.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( boolean.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanPrimitveDouble()
+    {
+        assertFalse( isAssignmentCompatible( boolean.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( boolean.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( boolean.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanPrimitveCharacter()
+    {
+        assertFalse( isAssignmentCompatible( boolean.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( boolean.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( boolean.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanPrimitiveString()
+    {
+        assertFalse( isAssignmentCompatible( boolean.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanPrimitiveObject()
+    {
+        assertFalse( isAssignmentCompatible( boolean.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanPrimitiveTestBean()
+    {
+        assertFalse( isAssignmentCompatible( boolean.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanWrapperBoolean()
+    {
+
+        assertTrue( isAssignmentCompatible( Boolean.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, boolean.class ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, Boolean.TYPE ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanWrapperByte()
+    {
+        assertFalse( isAssignmentCompatible( Boolean.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanWrapperShort()
+    {
+        assertFalse( isAssignmentCompatible( Boolean.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanWrapperInteger()
+    {
+        assertFalse( isAssignmentCompatible( Boolean.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanWrapperLong()
+    {
+        assertFalse( isAssignmentCompatible( Boolean.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanWrapperFloat()
+    {
+        assertFalse( isAssignmentCompatible( Boolean.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanWrapperDouble()
+    {
+        assertFalse( isAssignmentCompatible( Boolean.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanWrapperCharacter()
+    {
+        assertFalse( isAssignmentCompatible( Boolean.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( Boolean.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanWrapperString()
+    {
+        assertFalse( isAssignmentCompatible( Boolean.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanWrapperObject()
+    {
+        assertFalse( isAssignmentCompatible( Boolean.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBooleanWrapperTestBean()
+    {
+        assertFalse( isAssignmentCompatible( Boolean.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBytePrimitiveBoolean()
+    {
+        assertFalse( isAssignmentCompatible( byte.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( byte.class, Boolean.TYPE ) );
+        assertFalse( isAssignmentCompatible( byte.class, boolean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBytePrimitiveByte()
+    {
+        assertTrue( isAssignmentCompatible( byte.class, Byte.class ) );
+        assertTrue( isAssignmentCompatible( byte.class, Byte.TYPE ) );
+        assertTrue( isAssignmentCompatible( byte.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBytePrimitiveShort()
+    {
+        assertFalse( isAssignmentCompatible( byte.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( byte.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( byte.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBytePrimitiveInteger()
+    {
+        assertFalse( isAssignmentCompatible( byte.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( byte.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( byte.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBytePrimitiveLong()
+    {
+        assertFalse( isAssignmentCompatible( byte.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( byte.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( byte.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBytePrimitiveFloat()
+    {
+        assertFalse( isAssignmentCompatible( byte.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( byte.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( byte.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBytePrimitiveDouble()
+    {
+        assertFalse( isAssignmentCompatible( byte.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( byte.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( byte.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBytePrimitiveCharacter()
+    {
+        assertFalse( isAssignmentCompatible( byte.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( byte.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( byte.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBytePrimitiveString()
+    {
+        assertFalse( isAssignmentCompatible( byte.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBytePrimitiveObject()
+    {
+        assertFalse( isAssignmentCompatible( byte.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleBytePrimitveTestBean()
+    {
+        assertFalse( isAssignmentCompatible( byte.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleByteWrapperBoolean()
+    {
+
+        assertFalse( isAssignmentCompatible( Byte.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( Byte.class, boolean.class ) );
+        assertFalse( isAssignmentCompatible( Byte.class, Boolean.TYPE ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleByteWrapperByte()
+    {
+        assertTrue( isAssignmentCompatible( Byte.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( Byte.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( Byte.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleByteWrapperShort()
+    {
+        assertFalse( isAssignmentCompatible( Byte.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( Byte.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( Byte.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleByteWrapperInteger()
+    {
+        assertFalse( isAssignmentCompatible( Byte.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( Byte.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( Byte.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleByteWrapperLong()
+    {
+        assertFalse( isAssignmentCompatible( Byte.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( Byte.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( Byte.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleByteWrapperFloat()
+    {
+        assertFalse( isAssignmentCompatible( Byte.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( Byte.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( Byte.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleByteWrapperDouble()
+    {
+        assertFalse( isAssignmentCompatible( Byte.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( Byte.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( Byte.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleByteWrapperCharacter()
+    {
+        assertFalse( isAssignmentCompatible( Byte.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( Byte.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( Byte.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleByteWrapperString()
+    {
+        assertFalse( isAssignmentCompatible( Byte.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleByteWrapperObject()
+    {
+        assertFalse( isAssignmentCompatible( Byte.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleByteWrapperTestBean()
+    {
+        assertFalse( isAssignmentCompatible( Byte.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortPrimitiveBoolean()
+    {
+        assertFalse( isAssignmentCompatible( short.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( short.class, Boolean.TYPE ) );
+        assertFalse( isAssignmentCompatible( short.class, Boolean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortPrimitiveByte()
+    {
+        assertFalse( isAssignmentCompatible( short.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( short.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( short.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortPrimitiveShort()
+    {
+        assertTrue( isAssignmentCompatible( short.class, Short.class ) );
+        assertTrue( isAssignmentCompatible( short.class, Short.TYPE ) );
+        assertTrue( isAssignmentCompatible( short.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortPrimitiveInteger()
+    {
+        assertFalse( isAssignmentCompatible( short.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( short.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( short.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortPrimitiveLong()
+    {
+        assertFalse( isAssignmentCompatible( short.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( short.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( short.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortPrimitiveFloat()
+    {
+        assertFalse( isAssignmentCompatible( short.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( short.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( short.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortPrimitiveDouble()
+    {
+        assertFalse( isAssignmentCompatible( short.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( short.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( short.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortPrimitiveCharacter()
+    {
+        assertFalse( isAssignmentCompatible( short.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( short.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( short.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortPrimitiveString()
+    {
+        assertFalse( isAssignmentCompatible( short.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortPrimitiveObject()
+    {
+        assertFalse( isAssignmentCompatible( short.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortPrimitiveTestBean()
+    {
+        assertFalse( isAssignmentCompatible( short.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortWrapperBoolean()
+    {
+
+        assertFalse( isAssignmentCompatible( Short.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( Short.class, boolean.class ) );
+        assertFalse( isAssignmentCompatible( Short.class, Boolean.TYPE ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortWrapperByte()
+    {
+        assertFalse( isAssignmentCompatible( Short.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( Short.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( Short.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortWrapperShort()
+    {
+        assertTrue( isAssignmentCompatible( Short.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( Short.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( Short.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortWrapperInteger()
+    {
+        assertFalse( isAssignmentCompatible( Short.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( Short.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( Short.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortWrapperLong()
+    {
+        assertFalse( isAssignmentCompatible( Short.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( Short.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( Short.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortWrapperFloat()
+    {
+        assertFalse( isAssignmentCompatible( Short.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( Short.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( Short.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortWrapperDouble()
+    {
+        assertFalse( isAssignmentCompatible( Short.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( Short.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( Short.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortWrapperCharacter()
+    {
+        assertFalse( isAssignmentCompatible( Short.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( Short.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( Short.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortWrapperString()
+    {
+        assertFalse( isAssignmentCompatible( Short.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortWrapperObject()
+    {
+        assertFalse( isAssignmentCompatible( Short.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleShortWrapperTestBean()
+    {
+        assertFalse( isAssignmentCompatible( Short.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerPrimitiveBoolean()
+    {
+        assertFalse( isAssignmentCompatible( int.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( int.class, Boolean.TYPE ) );
+        assertFalse( isAssignmentCompatible( int.class, Boolean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerPrimitiveByte()
+    {
+        assertFalse( isAssignmentCompatible( int.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( int.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( int.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerPrimitiveShort()
+    {
+        assertFalse( isAssignmentCompatible( int.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( int.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( int.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerPrimitiveInteger()
+    {
+        assertTrue( isAssignmentCompatible( int.class, Integer.class ) );
+        assertTrue( isAssignmentCompatible( int.class, Integer.TYPE ) );
+        assertTrue( isAssignmentCompatible( int.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerPrimitiveLong()
+    {
+        assertFalse( isAssignmentCompatible( int.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( int.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( int.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerPrimitiveFloat()
+    {
+        assertFalse( isAssignmentCompatible( int.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( int.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( int.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerPrimitiveDouble()
+    {
+        assertFalse( isAssignmentCompatible( int.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( int.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( int.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerPrimitiveCharacter()
+    {
+        assertFalse( isAssignmentCompatible( int.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( int.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( int.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerPrimitiveString()
+    {
+        assertFalse( isAssignmentCompatible( int.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerPrimitiveObject()
+    {
+        assertFalse( isAssignmentCompatible( int.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerPrimitiveTestBean()
+    {
+        assertFalse( isAssignmentCompatible( int.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerWrapperBoolean()
+    {
+
+        assertFalse( isAssignmentCompatible( Integer.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( Integer.class, boolean.class ) );
+        assertFalse( isAssignmentCompatible( Integer.class, Boolean.TYPE ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerWrapperByte()
+    {
+        assertFalse( isAssignmentCompatible( Integer.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( Integer.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( Integer.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerWrapperShort()
+    {
+        assertFalse( isAssignmentCompatible( Integer.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( Integer.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( Integer.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerWrapperInteger()
+    {
+        assertTrue( isAssignmentCompatible( Integer.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( Integer.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( Integer.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerWrapperLong()
+    {
+        assertFalse( isAssignmentCompatible( Integer.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( Integer.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( Integer.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerWrapperFloat()
+    {
+        assertFalse( isAssignmentCompatible( Integer.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( Integer.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( Integer.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerWrapperDouble()
+    {
+        assertFalse( isAssignmentCompatible( Integer.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( Integer.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( Integer.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerWrapperCharacter()
+    {
+        assertFalse( isAssignmentCompatible( Integer.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( Integer.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( Integer.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerWrapperString()
+    {
+        assertFalse( isAssignmentCompatible( Integer.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerWrapperObject()
+    {
+        assertFalse( isAssignmentCompatible( Integer.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleIntegerWrapperTestBean()
+    {
+        assertFalse( isAssignmentCompatible( Integer.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongPrimitiveBoolean()
+    {
+        assertFalse( isAssignmentCompatible( long.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( long.class, Boolean.TYPE ) );
+        assertFalse( isAssignmentCompatible( long.class, Boolean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongPrimitiveByte()
+    {
+        assertFalse( isAssignmentCompatible( long.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( long.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( long.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongPrimitiveShort()
+    {
+        assertFalse( isAssignmentCompatible( long.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( long.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( long.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongPrimitiveInteger()
+    {
+        assertFalse( isAssignmentCompatible( long.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( long.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( long.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongPrimitiveLong()
+    {
+        assertTrue( isAssignmentCompatible( long.class, Long.class ) );
+        assertTrue( isAssignmentCompatible( long.class, Long.TYPE ) );
+        assertTrue( isAssignmentCompatible( long.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongPrimitiveFloat()
+    {
+        assertFalse( isAssignmentCompatible( long.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( long.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( long.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongPrimitiveDouble()
+    {
+        assertFalse( isAssignmentCompatible( long.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( long.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( long.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongPrimitiveCharacter()
+    {
+        assertFalse( isAssignmentCompatible( long.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( long.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( long.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongPrimitiveString()
+    {
+        assertFalse( isAssignmentCompatible( long.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongPrimitiveObject()
+    {
+        assertFalse( isAssignmentCompatible( long.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongPrimitiveTestBean()
+    {
+        assertFalse( isAssignmentCompatible( long.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongWrapperBoolean()
+    {
+
+        assertFalse( isAssignmentCompatible( Long.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( Long.class, boolean.class ) );
+        assertFalse( isAssignmentCompatible( Long.class, Boolean.TYPE ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongWrapperByte()
+    {
+        assertFalse( isAssignmentCompatible( Long.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( Long.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( Long.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongWrapperShort()
+    {
+        assertFalse( isAssignmentCompatible( Long.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( Long.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( Long.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongWrapperInteger()
+    {
+        assertFalse( isAssignmentCompatible( Long.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( Long.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( Long.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongWrapperLong()
+    {
+        assertTrue( isAssignmentCompatible( Long.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( Long.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( Long.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongWrapperFloat()
+    {
+        assertFalse( isAssignmentCompatible( Long.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( Long.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( Long.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongWrapperDouble()
+    {
+        assertFalse( isAssignmentCompatible( Long.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( Long.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( Long.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongWrapperCharacter()
+    {
+        assertFalse( isAssignmentCompatible( Long.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( Long.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( Long.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongWrapperString()
+    {
+        assertFalse( isAssignmentCompatible( Long.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongWrapperObject()
+    {
+        assertFalse( isAssignmentCompatible( Long.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleLongWrapperTestBean()
+    {
+        assertFalse( isAssignmentCompatible( Long.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatPrimitiveBoolean()
+    {
+        assertFalse( isAssignmentCompatible( float.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( float.class, Boolean.TYPE ) );
+        assertFalse( isAssignmentCompatible( float.class, Boolean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatPrimitiveByte()
+    {
+        assertFalse( isAssignmentCompatible( float.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( float.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( float.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatPrimitiveShort()
+    {
+        assertFalse( isAssignmentCompatible( float.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( float.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( float.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatPrimitiveInteger()
+    {
+        assertFalse( isAssignmentCompatible( float.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( float.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( float.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatPrimitiveLong()
+    {
+        assertFalse( isAssignmentCompatible( float.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( float.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( float.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatPrimitiveFloat()
+    {
+        assertTrue( isAssignmentCompatible( float.class, Float.class ) );
+        assertTrue( isAssignmentCompatible( float.class, Float.TYPE ) );
+        assertTrue( isAssignmentCompatible( float.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatPrimitiveDouble()
+    {
+        assertFalse( isAssignmentCompatible( float.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( float.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( float.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatPrimitiveCharacter()
+    {
+        assertFalse( isAssignmentCompatible( float.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( float.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( float.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatPrimitiveString()
+    {
+        assertFalse( isAssignmentCompatible( float.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatPrimitiveObject()
+    {
+        assertFalse( isAssignmentCompatible( float.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatPrimitiveTestBean()
+    {
+        assertFalse( isAssignmentCompatible( float.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatWrapperBoolean()
+    {
+
+        assertFalse( isAssignmentCompatible( Float.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( Float.class, boolean.class ) );
+        assertFalse( isAssignmentCompatible( Float.class, Boolean.TYPE ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatWrapperByte()
+    {
+        assertFalse( isAssignmentCompatible( Float.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( Float.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( Float.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatWrapperShort()
+    {
+        assertFalse( isAssignmentCompatible( Float.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( Float.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( Float.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatWrapperInteger()
+    {
+        assertFalse( isAssignmentCompatible( Float.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( Float.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( Float.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatWrapperLong()
+    {
+        assertFalse( isAssignmentCompatible( Float.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( Float.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( Float.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatWrapperFloat()
+    {
+        assertTrue( isAssignmentCompatible( Float.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( Float.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( Float.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatWrapperDouble()
+    {
+        assertFalse( isAssignmentCompatible( Float.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( Float.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( Float.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatWrapperCharacter()
+    {
+        assertFalse( isAssignmentCompatible( Float.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( Float.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( Float.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatWrapperString()
+    {
+        assertFalse( isAssignmentCompatible( Float.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatWrapperObject()
+    {
+        assertFalse( isAssignmentCompatible( Float.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleFloatWrapperTestBean()
+    {
+        assertFalse( isAssignmentCompatible( Float.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoublePrimitiveBoolean()
+    {
+        assertFalse( isAssignmentCompatible( double.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( double.class, Boolean.TYPE ) );
+        assertFalse( isAssignmentCompatible( double.class, Boolean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoublePrimitiveByte()
+    {
+        assertFalse( isAssignmentCompatible( double.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( double.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( double.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoublePrimitiveShort()
+    {
+        assertFalse( isAssignmentCompatible( double.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( double.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( double.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoublePrimitiveInteger()
+    {
+        assertFalse( isAssignmentCompatible( double.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( double.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( double.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoublePrimitiveLong()
+    {
+        assertFalse( isAssignmentCompatible( double.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( double.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( double.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoublePrimitiveFloat()
+    {
+        assertFalse( isAssignmentCompatible( double.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( double.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( double.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoublePrimitiveDouble()
+    {
+        assertTrue( isAssignmentCompatible( double.class, Double.class ) );
+        assertTrue( isAssignmentCompatible( double.class, Double.TYPE ) );
+        assertTrue( isAssignmentCompatible( double.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoublePrimitiveCharacter()
+    {
+        assertFalse( isAssignmentCompatible( double.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( double.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( double.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoublePrimitiveString()
+    {
+        assertFalse( isAssignmentCompatible( double.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoublePrimitiveObject()
+    {
+        assertFalse( isAssignmentCompatible( double.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoublePrimitiveTestBean()
+    {
+        assertFalse( isAssignmentCompatible( double.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoubleWrapperBoolean()
+    {
+
+        assertFalse( isAssignmentCompatible( Double.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( Double.class, boolean.class ) );
+        assertFalse( isAssignmentCompatible( Double.class, Boolean.TYPE ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoubleWrapperByte()
+    {
+        assertFalse( isAssignmentCompatible( Double.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( Double.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( Double.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoubleWrapperShort()
+    {
+        assertFalse( isAssignmentCompatible( Double.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( Double.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( Double.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoubleWrapperInteger()
+    {
+        assertFalse( isAssignmentCompatible( Double.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( Double.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( Double.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoubleWrapperLong()
+    {
+        assertFalse( isAssignmentCompatible( Double.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( Double.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( Double.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoubleWrapperFloat()
+    {
+        assertFalse( isAssignmentCompatible( Double.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( Double.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( Double.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoubleWrapperDouble()
+    {
+        assertTrue( isAssignmentCompatible( Double.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( Double.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( Double.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoubleWrapperCharacter()
+    {
+        assertFalse( isAssignmentCompatible( Double.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( Double.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( Double.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoubleWrapperString()
+    {
+        assertFalse( isAssignmentCompatible( Double.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoubleWrapperObject()
+    {
+        assertFalse( isAssignmentCompatible( Double.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleDoubleWrapperTestBean()
+    {
+        assertFalse( isAssignmentCompatible( Double.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterPrimitiveBoolean()
+    {
+        assertFalse( isAssignmentCompatible( char.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( char.class, Boolean.TYPE ) );
+        assertFalse( isAssignmentCompatible( char.class, Boolean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterPrimitiveByte()
+    {
+        assertFalse( isAssignmentCompatible( char.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( char.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( char.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterPrimitiveShort()
+    {
+        assertFalse( isAssignmentCompatible( char.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( char.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( char.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterPrimitiveInteger()
+    {
+        assertFalse( isAssignmentCompatible( char.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( char.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( char.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterPrimitiveLong()
+    {
+        assertFalse( isAssignmentCompatible( char.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( char.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( char.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterPrimitiveFloat()
+    {
+        assertFalse( isAssignmentCompatible( char.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( char.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( char.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterPrimitiveDouble()
+    {
+        assertFalse( isAssignmentCompatible( char.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( char.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( char.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterPrimitiveCharacter()
+    {
+        assertTrue( isAssignmentCompatible( char.class, Character.class ) );
+        assertTrue( isAssignmentCompatible( char.class, Character.TYPE ) );
+        assertTrue( isAssignmentCompatible( char.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterPrimitiveString()
+    {
+        assertFalse( isAssignmentCompatible( char.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterPrimitiveObject()
+    {
+        assertFalse( isAssignmentCompatible( char.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterPrimitiveTestBean()
+    {
+        assertFalse( isAssignmentCompatible( char.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterWrapperBoolean()
+    {
+
+        assertFalse( isAssignmentCompatible( Character.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( Character.class, boolean.class ) );
+        assertFalse( isAssignmentCompatible( Character.class, Boolean.TYPE ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterWrapperByte()
+    {
+        assertFalse( isAssignmentCompatible( Character.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( Character.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( Character.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterWrapperShort()
+    {
+        assertFalse( isAssignmentCompatible( Character.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( Character.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( Character.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterWrapperInteger()
+    {
+        assertFalse( isAssignmentCompatible( Character.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( Character.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( Character.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterWrapperLong()
+    {
+        assertFalse( isAssignmentCompatible( Character.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( Character.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( Character.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterWrapperFloat()
+    {
+        assertFalse( isAssignmentCompatible( Character.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( Character.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( Character.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterWrapperDouble()
+    {
+        assertFalse( isAssignmentCompatible( Character.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( Character.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( Character.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterWrapperCharacter()
+    {
+        assertTrue( isAssignmentCompatible( Character.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( Character.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( Character.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterWrapperString()
+    {
+        assertFalse( isAssignmentCompatible( Character.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterWrapperObject()
+    {
+        assertFalse( isAssignmentCompatible( Character.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleCharacterWrapperTestBean()
+    {
+        assertFalse( isAssignmentCompatible( Character.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleStringBoolean()
+    {
+
+        assertFalse( isAssignmentCompatible( String.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( String.class, boolean.class ) );
+        assertFalse( isAssignmentCompatible( String.class, Boolean.TYPE ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleStringByte()
+    {
+        assertFalse( isAssignmentCompatible( String.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( String.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( String.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleStringShort()
+    {
+        assertFalse( isAssignmentCompatible( String.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( String.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( String.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleStringInteger()
+    {
+        assertFalse( isAssignmentCompatible( String.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( String.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( String.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleStringLong()
+    {
+        assertFalse( isAssignmentCompatible( String.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( String.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( String.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleStringFloat()
+    {
+        assertFalse( isAssignmentCompatible( String.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( String.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( String.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleStringDouble()
+    {
+        assertFalse( isAssignmentCompatible( String.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( String.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( String.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleStringCharacter()
+    {
+        assertFalse( isAssignmentCompatible( String.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( String.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( String.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleStringString()
+    {
+        assertTrue( isAssignmentCompatible( String.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleStringObject()
+    {
+        assertFalse( isAssignmentCompatible( String.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleStringTestBean()
+    {
+        assertFalse( isAssignmentCompatible( String.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleObjectBoolean()
+    {
+
+        assertTrue( isAssignmentCompatible( Object.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( Object.class, boolean.class ) );
+        assertFalse( isAssignmentCompatible( Object.class, Boolean.TYPE ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleObjectByte()
+    {
+        assertTrue( isAssignmentCompatible( Object.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( Object.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( Object.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleObjectShort()
+    {
+        assertTrue( isAssignmentCompatible( Object.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( Object.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( Object.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleObjectInteger()
+    {
+        assertTrue( isAssignmentCompatible( Object.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( Object.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( Object.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleObjectLong()
+    {
+        assertTrue( isAssignmentCompatible( Object.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( Object.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( Object.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleObjectFloat()
+    {
+        assertTrue( isAssignmentCompatible( Object.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( Object.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( Object.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleObjectDouble()
+    {
+        assertTrue( isAssignmentCompatible( Object.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( Object.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( Object.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleObjectCharacter()
+    {
+        assertTrue( isAssignmentCompatible( Object.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( Object.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( Object.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleObjectString()
+    {
+        assertTrue( isAssignmentCompatible( Object.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleObjectObject()
+    {
+        assertTrue( isAssignmentCompatible( Object.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleObjectTestBean()
+    {
+        assertTrue( isAssignmentCompatible( Object.class, TestBean.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleTestBeanBoolean()
+    {
+
+        assertFalse( isAssignmentCompatible( TestBean.class, Boolean.class ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, boolean.class ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, Boolean.TYPE ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleTestBeanByte()
+    {
+        assertFalse( isAssignmentCompatible( TestBean.class, Byte.class ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, Byte.TYPE ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, byte.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleTestBeanShort()
+    {
+        assertFalse( isAssignmentCompatible( TestBean.class, Short.class ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, Short.TYPE ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, short.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleTestBeanInteger()
+    {
+        assertFalse( isAssignmentCompatible( TestBean.class, Integer.class ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, Integer.TYPE ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, int.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleTestBeanLong()
+    {
+        assertFalse( isAssignmentCompatible( TestBean.class, Long.class ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, Long.TYPE ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, long.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleTestBeanFloat()
+    {
+        assertFalse( isAssignmentCompatible( TestBean.class, Float.class ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, Float.TYPE ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, float.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleTestBeanDouble()
+    {
+        assertFalse( isAssignmentCompatible( TestBean.class, Double.class ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, Double.TYPE ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, double.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleTestBeanCharacter()
+    {
+        assertFalse( isAssignmentCompatible( TestBean.class, Character.class ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, Character.TYPE ) );
+        assertFalse( isAssignmentCompatible( TestBean.class, char.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleTestBeanString()
+    {
+        assertFalse( isAssignmentCompatible( TestBean.class, String.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleTestBeanObject()
+    {
+        assertFalse( isAssignmentCompatible( TestBean.class, Object.class ) );
+    }
+
+    @Test
+    public void isAssignmentCompatibleTestBeanTestBean()
+    {
+        assertTrue( isAssignmentCompatible( TestBean.class, TestBean.class ) );
+    }
+
+    @Test( expected = NullPointerException.class )
+    public void isAssignmentCompatibleNullClass()
+    {
+        isAssignmentCompatible( null, getClass() );
+    }
+
+    @Test( expected = NullPointerException.class )
+    public void isAssignmentCompatibleClassNull()
+    {
+        isAssignmentCompatible( getClass(), null );
+    }
+
+    @Test( expected = NullPointerException.class )
+    public void isAssignmentCompatibleNullNull()
+    {
+        TypeUtils.isAssignmentCompatible( getClass(), null );
+    }
+
+    @Test
+    public void getPrimitiveWrapperPrimitives()
+    {
+        assertEquals( Boolean.class, getPrimitiveWrapper( boolean.class ) );
+        assertEquals( Byte.class, getPrimitiveWrapper( byte.class ) );
+        assertEquals( Short.class, getPrimitiveWrapper( short.class ) );
+        assertEquals( Integer.class, getPrimitiveWrapper( int.class ) );
+        assertEquals( Long.class, getPrimitiveWrapper( long.class ) );
+        assertEquals( Float.class, getPrimitiveWrapper( float.class ) );
+        assertEquals( Double.class, getPrimitiveWrapper( double.class ) );
+        assertEquals( Character.class, getPrimitiveWrapper( char.class ) );
+    }
+
+    @Test
+    public void getPrimitiveWrapperWrappers()
+    {
+        assertNull( getPrimitiveWrapper( Boolean.class ) );
+        assertNull( getPrimitiveWrapper( Byte.class ) );
+        assertNull( getPrimitiveWrapper( Short.class ) );
+        assertNull( getPrimitiveWrapper( Integer.class ) );
+        assertNull( getPrimitiveWrapper( Long.class ) );
+        assertNull( getPrimitiveWrapper( Float.class ) );
+        assertNull( getPrimitiveWrapper( Double.class ) );
+        assertNull( getPrimitiveWrapper( Character.class ) );
+    }
+
+    @Test
+    public void getPrimitiveWrapperString()
+    {
+        assertNull( getPrimitiveWrapper( String.class ) );
+    }
+
+    @Test
+    public void getPrimitiveWrapperObject()
+    {
+        assertNull( getPrimitiveWrapper( Object.class ) );
+    }
+
+    @Test
+    public void getPrimitiveWrapperTestBean()
+    {
+        assertNull( getPrimitiveWrapper( TestBean.class ) );
+    }
+
+    @Test
+    public void getPrimitiveWrapperNull()
+    {
+        assertNull( getPrimitiveWrapper( null ) );
+    }
+
+    @Test
+    public void getPrimitiveTypePrimitives()
+    {
+        assertEquals( boolean.class, getPrimitiveType( Boolean.class ) );
+        assertEquals( byte.class, getPrimitiveType( Byte.class ) );
+        assertEquals( short.class, getPrimitiveType( Short.class ) );
+        assertEquals( int.class, getPrimitiveType( Integer.class ) );
+        assertEquals( long.class, getPrimitiveType( Long.class ) );
+        assertEquals( float.class, getPrimitiveType( Float.class ) );
+        assertEquals( double.class, getPrimitiveType( Double.class ) );
+        assertEquals( char.class, getPrimitiveType( Character.class ) );
+    }
+
+    @Test
+    public void getPrimitiveTypeWrappers()
+    {
+        assertNull( getPrimitiveType( boolean.class ) );
+        assertNull( getPrimitiveType( byte.class ) );
+        assertNull( getPrimitiveType( short.class ) );
+        assertNull( getPrimitiveType( int.class ) );
+        assertNull( getPrimitiveType( long.class ) );
+        assertNull( getPrimitiveType( float.class ) );
+        assertNull( getPrimitiveType( double.class ) );
+        assertNull( getPrimitiveType( char.class ) );
+    }
+
+    @Test
+    public void getPrimitiveTypeString()
+    {
+        assertNull( getPrimitiveType( String.class ) );
+    }
+
+    @Test
+    public void getPrimitiveTypeObject()
+    {
+        assertNull( getPrimitiveType( Object.class ) );
+    }
+
+    @Test
+    public void getPrimitiveTypeTestBean()
+    {
+        assertNull( getPrimitiveType( TestBean.class ) );
+    }
+
+    @Test
+    public void getPrimitiveTypeNull()
+    {
+        assertNull( getPrimitiveType( null ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassBooleanPrimitive()
+    {
+        assertEquals( Boolean.class, toNonPrimitiveClass( boolean.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassBooleanWrapper()
+    {
+        Class<Boolean> booleanClass = Boolean.class;
+        assertSame( booleanClass, toNonPrimitiveClass( booleanClass ) );
+        assertEquals( booleanClass, toNonPrimitiveClass( boolean.class ) );
+
+    }
+
+    @Test
+    public void toNonPrimitiveClassBytePrimitive()
+    {
+        assertEquals( Byte.class, toNonPrimitiveClass( byte.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassByteWrapper()
+    {
+        Class<Byte> byteClass = Byte.class;
+        assertSame( byteClass, toNonPrimitiveClass( byteClass ) );
+        assertEquals( byteClass, toNonPrimitiveClass( byte.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassShortPrimitive()
+    {
+        assertEquals( Short.class, toNonPrimitiveClass( short.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassShortWrapper()
+    {
+        Class<Short> shortClass = Short.class;
+        assertSame( shortClass, toNonPrimitiveClass( shortClass ) );
+        assertEquals( shortClass, toNonPrimitiveClass( short.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassIntegerPrimitive()
+    {
+        assertEquals( Integer.class, toNonPrimitiveClass( int.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassIntegerWrapper()
+    {
+        Class<Integer> integerClass = Integer.class;
+        assertSame( integerClass, toNonPrimitiveClass( integerClass ) );
+        assertEquals( integerClass, toNonPrimitiveClass( int.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassLongPrimitive()
+    {
+        assertEquals( Long.class, toNonPrimitiveClass( long.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassLongWrapper()
+    {
+        Class<Long> longClass = Long.class;
+        assertSame( longClass, toNonPrimitiveClass( longClass ) );
+        assertEquals( longClass, toNonPrimitiveClass( long.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassFloatPrimitive()
+    {
+        assertEquals( Float.class, toNonPrimitiveClass( float.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassFloatWrapper()
+    {
+        Class<Float> floatClass = Float.class;
+        assertSame( floatClass, toNonPrimitiveClass( floatClass ) );
+        assertEquals( floatClass, toNonPrimitiveClass( float.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassDoublePrimitive()
+    {
+        assertEquals( Double.class, toNonPrimitiveClass( double.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassDoubleWrapper()
+    {
+        Class<Double> doubleClass = Double.class;
+        assertSame( doubleClass, toNonPrimitiveClass( doubleClass ) );
+        assertEquals( doubleClass, toNonPrimitiveClass( double.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassCharacterPrimitive()
+    {
+        assertEquals( Character.class, toNonPrimitiveClass( char.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassCharacterWrapper()
+    {
+        Class<Character> characterClass = Character.class;
+        assertSame( characterClass, toNonPrimitiveClass( characterClass ) );
+        assertEquals( characterClass, toNonPrimitiveClass( char.class ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassString()
+    {
+        Class<String> stringClass = String.class;
+        assertSame( stringClass, toNonPrimitiveClass( stringClass ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassObject()
+    {
+        Class<Object> objectClass = Object.class;
+        assertSame( objectClass, toNonPrimitiveClass( objectClass ) );
+    }
+
+    @Test
+    public void toNonPrimitiveClassTestBean()
+    {
+        Class<TestBean> testBeanClass = TestBean.class;
+        assertSame( testBeanClass, toNonPrimitiveClass( testBeanClass ) );
+    }
+
+    @Test( expected = NullPointerException.class )
+    public void toNonPrimitiveNull()
+    {
+        toNonPrimitiveClass( null );
+    }
+
+}

Propchange: commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/TypeUtilsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/TypeUtilsTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/TypeUtilsTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message