### Question:
PersistenceTransformations { public static AccessToken toAccessToken(PersistentAccessToken persistentAccessToken) { AccessToken accessToken = null; if (persistentAccessToken != null) { accessToken = new AccessToken(); accessToken.setClientId(persistentAccessToken.getClientId()); accessToken.setCodeId(persistentAccessToken.getCodeId()); accessToken.setCreated(persistentAccessToken.getCreated()); accessToken.setExpiresIn(persistentAccessToken.getExpiresIn()); accessToken.setRefreshToken(persistentAccessToken.getRefreshToken()); accessToken.setScope(persistentAccessToken.getScope()); accessToken.setToken(persistentAccessToken.getToken()); accessToken.setType(persistentAccessToken.getType()); accessToken.setUserId(persistentAccessToken.getUserId()); accessToken.setValid(persistentAccessToken.isValid()); accessToken.setDetails(JsonUtils.convertStringToMap(persistentAccessToken.getDetails())); accessToken.setApplicationDetails(JsonUtils.convertStringToMap(persistentAccessToken.getApplicationDetails())); String refreshExpiresIn = (persistentAccessToken.getRefreshExpiresIn() != null && !persistentAccessToken.getRefreshExpiresIn().isEmpty()) ? persistentAccessToken .getRefreshExpiresIn() : persistentAccessToken.getExpiresIn(); accessToken.setRefreshExpiresIn(refreshExpiresIn); } return accessToken; }  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_access_token_found_return_null() throws Exception { AccessToken token = PersistenceTransformations.toAccessToken(null); assertNull(token); }