### Question:
RoleSerialization extends FileRepositorySerializer<RoleRecord> { @Override protected String serialize( RoleRecord role ) { return String.join( roleSeparator, role.name(), String.join( userSeparator, role.users() ) ); }    }### Answer:
@Test public void shouldSerializeAndDeserialize() throws Exception { RoleSerialization serialization = new RoleSerialization(); List<RoleRecord> roles = asList( new RoleRecord( "admin", steveBob ), new RoleRecord( "publisher", kellyMarie ) ); byte[] serialized = serialization.serialize( roles ); assertThat( serialization.deserializeRecords( serialized ), equalTo( roles ) ); }