package org.simpleflatmapper.reflect.getter;

import org.junit.Before;
import org.junit.Test;
import org.simpleflatmapper.reflect.Getter;

import java.lang.reflect.Type;
import java.sql.Timestamp;
import java.util.Date;

import static org.junit.Assert.*;

public class GetterFactoryRegistryTest {
    GetterFactoryRegistry<Object, Object> getterFactoryRegistry;
    GetterFactory<Object, Object> gf1;

    @Before
    public void setUp() {
        getterFactoryRegistry = new GetterFactoryRegistry<Object, Object>();

        gf1 = new GetterFactory<Object, Object>() {
            @Override
            public <P> Getter<Object, P> newGetter(Type target, Object key, Object... properties) {
                return null;
            }
        };

        getterFactoryRegistry.put(Timestamp.class, gf1);
    }

    @Test
    public void testIndirectLookup() {
        assertSame(gf1, getterFactoryRegistry.findFactoryFor(Date.class));
    }

    @Test
    public void testDirectLookup() {
        assertSame(gf1, getterFactoryRegistry.findFactoryFor(Timestamp.class));
    }

    @Test
    public void testNoMatch() {
        assertNull(getterFactoryRegistry.findFactoryFor(java.sql.Date.class));
    }

}
@@ -166,58 +166,8 @@
 ype;
-%0Aimport java.sql.Timestamp;%0Aimport java.util.Date;
 %0A%0Aim
@@ -724,25 +724,20 @@
 try.put(
-Timestamp
+Long
 .class, 
@@ -859,20 +859,22 @@
 toryFor(
-Date
+Number
 .class))
@@ -994,17 +994,12 @@
 For(
-Timestamp
+Long
 .cla
@@ -1113,21 +1113,14 @@
 For(
-java.sql.Date
+String
 .cla

use java lang instead of sql