// User loggedUser = UserSession.getInstance().getLoggedUser();\r
User loggedInUser = getLoggedInUser();\r
if (loggedInUser != null) {\r
- boolean isFriend = user.isFriendsWith(loggedInUser); \r
// The deepest branch. For refactoring legacy code we must begin from the\r
// deepest branch. This is just the opposite for creating the unit test\r
// for our legacy code.\r
// to shortest branch. Modifications in the legacy code may be hand made.\r
// In this case we can not do anything with this code (this is the deepest branch)\r
// so we will have to start with the for loop (which is the second deepest branch)\r
- if (isFriend) {\r
+ if (user.isFriendsWith(loggedInUser)) {\r
tripList = tripsBy(user);\r
}\r
return tripList;\r