JBBPNamedNumericFieldMap implements JBBPFieldFinder { public JBBPExternalValueProvider getExternalValueProvider() { return this.externalValueProvider; } JBBPNamedNumericFieldMap();  JBBPNamedNumericFieldMap(final JBBPExternalValueProvider externalValueProvider); JBBPExternalValueProvider getExternalValueProvider(); JBBPNumericField get(final JBBPNamedFieldInfo namedField); void putField(final JBBPNumericField field); JBBPNumericField remove(final JBBPNamedFieldInfo nameInfo); JBBPNumericField findForFieldOffset(final int offset); @Override T findFirstFieldForType(final Class<T> fieldType); @Override T findLastFieldForType(final Class<T> fieldType); @Override T findFieldForType(final Class<T> fieldType); @Override T findFieldForNameAndType(final String fieldName, final Class<T> fieldType); @Override T findFieldForPathAndType(final String fieldPath, final Class<T> fieldType); @Override JBBPAbstractField findFieldForName(final String fieldName); @Override JBBPAbstractField findFieldForPath(final String fieldPath); @Override boolean nameExists(final String fieldName); @Override boolean pathExists(final String fieldPath); void clear(); boolean isEmpty(); int size(); int getExternalFieldValue(final String externalFieldName, final JBBPCompiledBlock compiledBlock, final JBBPIntegerValueEvaluator evaluator);  }
@Test public void testGetExternalValueProvider() { final JBBPExternalValueProvider provider = (fieldName, numericFieldMap, compiledBlock) -> 0; final JBBPNamedNumericFieldMap map = new JBBPNamedNumericFieldMap(provider); assertSame(provider, map.getExternalValueProvider()); final JBBPNamedNumericFieldMap map2 = new JBBPNamedNumericFieldMap(null); try { map2.getExternalFieldValue("test", JBBPCompiledBlock.prepare().setSource("").setCompiledData(new byte[] {0}).build(), null); fail("Must throw JBBPEvalException"); } catch (JBBPEvalException ex) { } }