when(query.list()).thenReturn(ImmutableList.of(txaction));
this.session = mock(Session.class);
when(session.getNamedQuery(Mockito.anyString())).thenReturn(query);
this.dao = new InvestmentTxactionDAO(new Provider<Session>() {
@Override
public Session get() {
return session;
}
});