import net.buffalo.protocal.util.ClassFieldNamePair;
import junit.framework.TestCase;
public class ClassFieldNamePairTest extends TestCase {
public void testEquals() throws Exception {
ClassFieldNamePair pair1 = new ClassFieldNamePair(Long.class, "something");
ClassFieldNamePair pair2 = new ClassFieldNamePair(Long.class, "something");
ClassFieldNamePair pair3 = new ClassFieldNamePair(Double.class, "something");
assertEquals(pair1, pair2);
assertFalse(pair2.equals(pair3));
Map map = new HashMap();
map.put(pair1, "pair1");
map.put(pair2, "pair2");
assertSame("pair2", map.get(new ClassFieldNamePair(Long.class, "something")));
}