private User createUser2() {
   User user = new User();
   user.setId(1);
   user.setName("Adrian");
   user.setSurname("Nistor");
   user.setGender(User.Gender.MALE);
   Address address = new Address();
   address.setStreet("Old Street");
   address.setPostCode("XYZ");
   user.setAddresses(Collections.singletonList(address));
   return user;
 }
 private User createUser1() {
   User user = new User();
   user.setId(1);
   user.setName("Tom");
   user.setSurname("Cat");
   user.setGender(User.Gender.MALE);
   user.setAccountIds(Collections.singletonList(12));
   Address address = new Address();
   address.setStreet("Dark Alley");
   address.setPostCode("1234");
   user.setAddresses(Collections.singletonList(address));
   return user;
 }
  private byte[] createMarshalledUser(String name, String surname) throws IOException {
    User user = new User();
    user.setId(1);
    user.setName(name);
    user.setSurname(surname);
    user.setGender(User.Gender.MALE);
    user.setAccountIds(Collections.singleton(12));

    Address address = new Address();
    address.setStreet("Dark Alley");
    address.setPostCode("1234");
    user.setAddresses(Collections.singletonList(address));

    return ProtobufUtil.toWrappedByteArray(
        ProtobufMetadataManagerImpl.getSerializationContextInternal(cacheManager), user);
  }