### Question:
MapArguments implements NamedArgumentFinder { @Override public Optional<Argument> find(String name, StatementContext ctx) { if (args.containsKey(name)) { final Object argument = args.get(name); final Class<?> argumentClass = argument == null ? Object.class : argument.getClass(); return ctx.findArgumentFor(argumentClass, argument); } return Optional.empty(); } MapArguments(Map<String, ?> args); @Override Optional<Argument> find(String name, StatementContext ctx); @Override Collection<String> getNames(); @Override String toString();  }### Answer:
@Test public void testBind() throws Exception { Map<String, Object> args = Collections.singletonMap("foo", BigDecimal.ONE); new MapArguments(args).find("foo", ctx).get().apply(5, stmt, null); verify(stmt).setBigDecimal(5, BigDecimal.ONE); }
@Test public void testNullBinding() throws Exception { Map<String, Object> args = Collections.singletonMap("foo", null); new MapArguments(args).find("foo", ctx).get().apply(3, stmt, null); verify(stmt).setNull(3, Types.OTHER); }