### Question:
UserAttributesConverter implements ToServerConverter<ClientAttribute, ProfileAttribute, ToServerConversionOptions>,
        ToClientConverter<ProfileAttribute, ClientAttribute, ToClientConversionOptions> { @Override public ClientAttribute toClient(ProfileAttribute serverObject, ToClientConversionOptions options) { ClientAttribute client = new ClientAttribute(); client.setName(serverObject.getAttrName()); if (serverObject.isSecure()) { client.setSecure(true); } else { client.setValue(serverObject.getAttrValue()); } if (serverObject.getLevel() == ProfileAttributeLevel.PARENT) { client.setInherited(true); } if (isVisibleAttrHolder(serverObject)) { client.setHolder(recipientIdentityResolver.toRecipientUri(serverObject.getPrincipal())); } client.setDescription(serverObject.getDescription()); Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); String checkSecurityForAttrPath = attributePathTransformer.transformPath(serverObject.getPath(), authentication); InternalURI internalURI = new InternalURIDefinition(checkSecurityForAttrPath, PermissionUriProtocol.ATTRIBUTE); client.setPermissionMask(attributesPermissionService.getEffectivePermission(internalURI, authentication).getPermissionMask()); return client; }  @Override ClientAttribute toClient(ProfileAttribute serverObject, ToClientConversionOptions options); @Override ProfileAttribute toServer(ClientAttribute clientObject, ToServerConversionOptions options); @Override ProfileAttribute toServer(ClientAttribute clientObject, ProfileAttribute resultToUpdate, ToServerConversionOptions options); void setProfileAttributeService(ProfileAttributeService profileAttributeService); void setAttributesPermissionService(PermissionsService attributesPermissionService); void setRecipientIdentityResolver(RecipientIdentityResolver recipientIdentityResolver); void setAttributePathTransformer(AttributePathTransformer attributePathTransformer); void setAttributesConfig(AttributesConfig attributesConfig); @Override String getServerResourceType(); @Override String getClientResourceType();  }### Answer:
@Test public void testToClient() throws Exception { ClientAttribute converted = converter.toClient(server, null); assertEquals(converted.getName(), server.getAttrName()); assertEquals(converted.getValue(), server.getAttrValue()); assertTrue(converted.getPermissionMask() == 1); }