### Question:
UserDao extends CrudDAO<User> { public User findUserByLogin(String login) { return getWrapper().wrapAndExecute(session -> { User result = null; try { result = session.createQuery("from User where login = :login", User.class) .setParameter("login", login).getSingleResult(); } catch (Exception e) { LOG.error(e.getMessage(), e); } return result; } ); } UserDao(SessionFactory sf); User findUserByLogin(String login);  }### Answer:
@Test public void findUserByLogin() { User expect = new User(); expect.setLogin("testLogin10"); expect.setPassword("testPassword10"); this.getTestDao().add(expect); assertThat(this.getTestDao().findUserByLogin(expect.getLogin()).getPassword(), is(expect.getPassword())); }