when(counterMeta.structure().isStaticColumn()).thenReturn(false);
when(statementGenerator.prepareCommonWhereClauseForUpdate(update("table").with(incr("count", bindMarker("count"))), false))
.thenReturn(update("table").where());
when(statementGenerator.prepareCommonWhereClauseForUpdate(update("table").with(decr("count", bindMarker("count"))), false))
.thenReturn(update("table").where());
when(statementGenerator.generateWhereClauseForSelect(Optional.fromNullable(counterMeta), select("count").from("table")))
.thenReturn(select("count").from("table").where(eq("id", bindMarker("id"))));
when(statementGenerator.generateWhereClauseForSelect(Optional.<PropertyMeta>absent(), select().from("table")))
.thenReturn(select().from("table"));