### Question:
PersistenceTransformations { public static ClientCredentials toClientCredentials(PersistentClientCredentials persistentClientCredentials) { ClientCredentials clientCredentials = null; if (persistentClientCredentials != null) { clientCredentials = new ClientCredentials(); clientCredentials.setName(persistentClientCredentials.getName()); clientCredentials.setScope(persistentClientCredentials.getScope()); clientCredentials.setDescr(persistentClientCredentials.getDescr()); clientCredentials.setUri(persistentClientCredentials.getUri()); clientCredentials.setId(persistentClientCredentials.getId()); clientCredentials.setSecret(persistentClientCredentials.getSecret()); clientCredentials.setStatus(persistentClientCredentials.getStatus()); clientCredentials.setType(persistentClientCredentials.getType()); clientCredentials.setCreated(persistentClientCredentials.getCreated()); clientCredentials.setApplicationDetails(persistentClientCredentials.getApplicationDetails()); } return clientCredentials; }  static Scope toScope(PersistentScope persistenceScope); static PersistentScope toPersistentScope(Scope scope); static ClientCredentials toClientCredentials(PersistentClientCredentials persistentClientCredentials); static PersistentClientCredentials toPersistentClientCredentials(ClientCredentials clientCredentials); static PersistentAuthCode toPersistentAuthCode(AuthCode authCode); static AuthCode toAuthCode(PersistentAuthCode persistentAuthCode); static PersistentAccessToken toPersistentAccessToken(AccessToken accessToken); static AccessToken toAccessToken(PersistentAccessToken persistentAccessToken); static ApplicationInfo toApplicationInfo(PersistentClientCredentials clientCredentials);  }### Answer:
@Test public void when_no_client_credentials_found_return_null() throws Exception { ClientCredentials clientCreds = PersistenceTransformations.toClientCredentials(null); assertNull(clientCreds); }