### Question:
UserService { public User register(final String username, final String password) { UserProfile profile = lmisServer.validateLogin(new User(username, password)); User user = new User(username, password); if (profile.getOrganisationUnits().size() > 0) { user.setFacilityCode(profile.getOrganisationUnits().get(0).getId()); user.setFacilityName(profile.getOrganisationUnits().get(0).getName()); } else { user.setFacilityCode("BLANK"); user.setFacilityName("BLANK"); Log.e("Error", "No organisations found for " + username); } saveUserToDatabase(user); syncManager.createSyncAccount(user); return user; }  boolean userRegistered(); User register(final String username, final String password); User saveUserToDatabase(final User user); User getRegisteredUser();  }### Answer:
@Test public void shouldSaveTheOrgUnitIfAvailable() throws Exception { setUpSuccessHttpGetRequest(200,"userResponse.json"); User newUser = userService.register("admin", "district"); assertThat(newUser.getFacilityName(), is("tw office")); assertThat(newUser.getFacilityCode(), is("hOw1BJrojgE")); }