@Test
public void should_prepare_select_eager_ps_with_static_columns() throws Exception {
PropertyMeta nameMeta = mock(PropertyMeta.class, RETURNS_DEEP_STUBS);
when(meta.forOperations().getColumnsMetaToLoad()).thenReturn(asList(nameMeta));
when(nameMeta.forStatementGeneration().prepareSelectField(isA(Selection.class))).thenReturn(select().column("name"));
when(meta.structure().hasOnlyStaticColumns()).thenReturn(true);
when(meta.getAllMetasExceptId()).thenReturn(asList(nameMeta));
when(idMeta.forStatementGeneration().generateWhereClauseForSelect(Mockito.eq(Optional.fromNullable(nameMeta)), isA(Select.class)))
.thenReturn(select("name").from("ks","table").where(eq("id", bindMarker("id"))));