### Question:
LimitBinding { public SelectQuery bind() { if (limitAttribute != null || offsetAttribute != null) { selectQuery.addLimit(offsetAttribute == null ? 0 : offsetAttribute, limitAttribute == null ? 0 : limitAttribute); } return selectQuery; } LimitBinding(Integer limitAttribute, Integer offsetAttribute, SelectQuery selectQuery); SelectQuery bind();  }### Answer:
@Test public void testBind() { DSLContext context = DSLContextHelper.buildContext(); { LimitBinding cut = new LimitBinding(null, null, context.selectQuery()); SelectQuery actual = cut.bind(); assertThat(actual.toString()).isEqualTo("select 1"); } { LimitBinding cut = new LimitBinding(1, null, context.selectQuery()); SelectQuery actual = cut.bind(); assertThat(actual.toString()).isEqualTo("select 1\n" + "limit 1"); } { LimitBinding cut = new LimitBinding(null, 1, context.selectQuery()); SelectQuery actual = cut.bind(); assertThat(actual.toString()).isEqualTo("select 1\n" + "limit 0\n" + "offset 1"); } { LimitBinding cut = new LimitBinding(1, 1, context.selectQuery()); SelectQuery actual = cut.bind(); assertThat(actual.toString()).isEqualTo("select 1\n" + "limit 1\n" + "offset 1"); } }