### Question:
CachedCurrentUserController implements ParseCurrentUserController { private ParseUser lazyLogIn() { Map<String, String> authData = ParseAnonymousUtils.getAuthData(); return lazyLogIn(ParseAnonymousUtils.AUTH_TYPE, authData); } CachedCurrentUserController(ParseObjectStore<ParseUser> store); @Override Task<Void> setAsync(final ParseUser user); @Override Task<Void> setIfNeededAsync(ParseUser user); @Override Task<ParseUser> getAsync(); @Override Task<Boolean> existsAsync(); @Override boolean isCurrent(ParseUser user); @Override void clearFromMemory(); @Override void clearFromDisk(); @Override Task<String> getCurrentSessionTokenAsync(); @Override Task<Void> logOutAsync(); @Override Task<ParseUser> getAsync(final boolean shouldAutoCreateUser);  }### Answer:
@Test public void testLazyLogin() throws Exception { CachedCurrentUserController controller = new CachedCurrentUserController(null); String authType = ParseAnonymousUtils.AUTH_TYPE; Map<String, String> authData = new HashMap<>(); authData.put("sessionToken", "testSessionToken"); ParseUser user = controller.lazyLogIn(authType, authData); assertTrue(user.isLazy()); assertTrue(user.isCurrentUser()); Map<String, Map<String, String>> authPair = user.getMap(KEY_AUTH_DATA); assertEquals(1, authPair.size()); Map<String, String> authDataAgain = authPair.get(authType); assertEquals(1, authDataAgain.size()); assertEquals("testSessionToken", authDataAgain.get("sessionToken")); assertSame(user, controller.currentUser); assertFalse(controller.currentUserMatchesDisk); }
@Test public void testLazyLogin() { CachedCurrentUserController controller = new CachedCurrentUserController(null); String authType = ParseAnonymousUtils.AUTH_TYPE; Map<String, String> authData = new HashMap<>(); authData.put("sessionToken", "testSessionToken"); ParseUser user = controller.lazyLogIn(authType, authData); assertTrue(user.isLazy()); assertTrue(user.isCurrentUser()); Map<String, Map<String, String>> authPair = user.getMap(KEY_AUTH_DATA); assertEquals(1, authPair.size()); Map<String, String> authDataAgain = authPair.get(authType); assertEquals(1, authDataAgain.size()); assertEquals("testSessionToken", authDataAgain.get("sessionToken")); assertSame(user, controller.currentUser); assertFalse(controller.currentUserMatchesDisk); }