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

    User user = new User();
    user.setId(new UserId(UUID.fromString("cd481534-27cc-11e7-93ae-92361f002671")));
    user.setTenantId(new TenantId(UUID.fromString("1edcb2c6-27cb-11e7-93ae-92361f002671")));
    user.setCustomerId(new CustomerId(UUID.fromString("51477cb4-27cb-11e7-93ae-92361f002671")));
    user.setEmail("user@thingsboard.org");
    user.setFirstName("Jackson");
    user.setLastName("Roberts");
    ObjectMapper mapper = new ObjectMapper();
    String additionalInfo = "{\"key\":\"value-100\"}";
    JsonNode jsonNode = mapper.readTree(additionalInfo);
    user.setAdditionalInfo(jsonNode);
    userDao.save(user);
    assertEquals(6, userDao.find().size());
    User savedUser = userDao.findByEmail("user@thingsboard.org");
    assertNotNull(savedUser);
    assertEquals(additionalInfo, savedUser.getAdditionalInfo().toString());
}