SignOut action = new SignOut();
action.setAuthServiceName(AuthServiceName.googleAccounts);
action.setSignOutOfApp(true);
action.setSignOutOfExternalService(false);
SignOutResult result = (SignOutResult)dispatch.execute(null, action);
assertNotNull(result);
assertNotNull(result.getRedirectUrl());
assertEquals("http://127.0.0.1:8888", result.getRedirectUrl());
action = new SignOut();
action.setAuthServiceName(AuthServiceName.googleAccounts);
action.setSignOutOfApp(false);
action.setSignOutOfExternalService(true);
result = (SignOutResult)dispatch.execute(null, action);
assertNotNull(result);
assertNotNull(result.getRedirectUrl());
assertEquals("/_ah/logout?continue=http%3A%2F%2F127.0.0.1%3A8888",
result.getRedirectUrl());
action = new SignOut();
action.setAuthServiceName(AuthServiceName.googleAccounts);
action.setSignOutOfApp(true);
action.setSignOutOfExternalService(true);
result = (SignOutResult)dispatch.execute(null, action);
assertNotNull(result);
assertNotNull(result.getRedirectUrl());
assertEquals("/_ah/logout?continue=http%3A%2F%2F127.0.0.1%3A8888",
result.getRedirectUrl());
}