2627282930313233343536
protected Session session; protected DocumentDAO dao; public void setup() throws Exception { this.session = mock(Session.class); this.dao = new DocumentDAO(new Provider<Session>() { @Override public Session get() { return session; } });