@Test
public void testFindFieldForNameAndType() {

  final JBBPNamedNumericFieldMap map = new JBBPNamedNumericFieldMap();
  final JBBPNumericField field = new JBBPFieldInt(new JBBPNamedFieldInfo("test.test", "test", 0), 123);
  map.putField(field);
  assertSame(field, map.findFieldForNameAndType("tESt", JBBPFieldInt.class));
  assertNull(map.findFieldForNameAndType("test", JBBPFieldByte.class));
  assertNull(map.findFieldForNameAndType("test1", JBBPFieldInt.class));
  try {
    map.findFieldForNameAndType(null, JBBPFieldInt.class);
    fail("Must throw NPE");
  } catch (NullPointerException ex) {
  }
  try {
    map.findFieldForNameAndType("test.test", null);
    fail("Must throw NPE");
  } catch (NullPointerException ex) {
  }
}