@Test
public void testFindFieldForPathAndType() {

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