@Test
@DatabaseSetup("classpath:dbunit/user.xml")
public void testFindByEmail() {

    User user = userDao.findByEmail("sysadm@thingsboard.org");
    assertNotNull("User is expected to be not null", user);
    assertEquals("9cb58ba0-27c1-11e7-93ae-92361f002671", user.getId().toString());
    assertEquals("c97ea14e-27c1-11e7-93ae-92361f002671", user.getTenantId().toString());
    assertEquals("cdf9c79e-27c1-11e7-93ae-92361f002671", user.getCustomerId().toString());
    assertEquals(Authority.SYS_ADMIN, user.getAuthority());
    assertEquals("John", user.getFirstName());
    assertEquals("Doe", user.getLastName());
}