### Question:
ArgumentBinder { void bind(Binding binding) { if (params.isPositional()) { bindPositional(binding); } else { bindNamed(binding); } } ArgumentBinder(PreparedStatement stmt, StatementContext ctx, ParsedParameters params);   }### Answer:
@Test public void testPositionalEmpty() { assertThatCode(() -> new ArgumentBinder<>(stmt, ctx, positionalParams(0)).bind(positionalBinding(0))) .doesNotThrowAnyException(); }
@Test public void testNamedEmpty() { assertThatCode(() -> new ArgumentBinder<>(stmt, ctx, namedParams()).bind(namedBinding())) .doesNotThrowAnyException(); }
@Test public void testPositionalDeclaredButNotProvided() { assertThatThrownBy(() -> new ArgumentBinder<>(stmt, ctx, positionalParams(1)).bind(positionalBinding(0))) .isInstanceOf(UnableToCreateStatementException.class); }
@Test public void testNamedDeclaredButNotProvided() { assertThatThrownBy(() -> new ArgumentBinder<>(stmt, ctx, namedParams("unused")).bind(namedBinding())) .isInstanceOf(UnableToCreateStatementException.class); }
@Test public void testPositionalNotDeclaredButProvided() { assertThatThrownBy(() -> new ArgumentBinder<>(stmt, ctx, positionalParams(0)).bind(positionalBinding(1))) .isInstanceOf(UnableToCreateStatementException.class); }
@Test public void testNamedNotDeclaredButProvided() { assertThatThrownBy(() -> new ArgumentBinder<>(stmt, ctx, namedParams()).bind(namedBinding("unused"))) .isInstanceOf(UnableToCreateStatementException.class); }
@Test public void testPositionalNotDeclaredButProvidedWithPermission() { allowUnused(); assertThatCode(() -> new ArgumentBinder<>(stmt, ctx, positionalParams(0)).bind(positionalBinding(1))) .doesNotThrowAnyException(); }
@Test public void testNamedNotDeclaredButProvidedWithPermission() { allowUnused(); assertThatCode(() -> new ArgumentBinder<>(stmt, ctx, namedParams()).bind(namedBinding("unused"))) .doesNotThrowAnyException(); }