final Collection<? extends GrantedAuthority> authorities = Arrays.asList(new SimpleGrantedAuthority("foo"));
final User user = new User("foo", "bar", authorities);
final ObjectBuffer buffer = new ObjectBuffer(kryo, 100, 1024);
final byte[] data = buffer.writeObject(user);
final User user2 = buffer.readObject(data, User.class);
TestUtils.assertDeepEquals(user, user2);
}
}