@@ -0,0 +1,593 @@
+package com.novoda.notils.caster;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.hamcrest.core.IsInstanceOf.instanceOf;%0Aimport static org.junit.Assert.assertThat;%0A%0Apublic class ClassesTest %7B%0A%0A    @Test%0A    public void testCastingIsWorking() %7B%0A        Object object = new Integer(0);%0A%0A        Integer integer = Classes.from(object);%0A%0A        assertThat(integer, instanceOf(Integer.class));%0A    %7D%0A%0A    @Test(expected = ClassCastException.class)%0A    public void testThatAWrongCastingThrowsAnException() %7B%0A        Object object = new Object();%0A%0A        Integer integer = Classes.from(object);%0A    %7D%0A%7D%0A

Add ClassesTest