@Test
public void testCycle3() throws MalformedURLException {
Mapping<User> mapping = new Mapping7<User>(User.class, 125, "id", "phone", "point", "iq", "height", "lifeFormId", "salary", "birthday", "name", "sign",
"male");
TarantoolTemplate tpl = new TarantoolTemplate7(new SocketChannelPooledConnectionFactory("localhost", 33313, 1, 10));
tpl.addMapping(mapping);
try {
tpl.find(User.class).condition("string");
fail();
} catch (IllegalArgumentException ignored) {
}
try {
tpl.find(User.class, 1, "name", "phone").condition("string", 123);
fail();
} catch (IllegalArgumentException ignored) {
}
User user = new User();
tpl.delete(User.class, user.getId()).delete();
assertNull(tpl.find(User.class, 0, "id").condition(123).one());
assertEquals(1, tpl.save(user).insertOrReplace());
try {
tpl.save(user).insert();
fail();
} catch (TarantoolException e) {
}
user.setBirthday(new Date((user.getBirthday().getTime() / 1000L) * 1000L));
assertTrue(user.equals(tpl.save(user).replaceAndGet()));
assertNotNull(tpl.find(User.class, 1, "name").condition(user.getName()).one());
}