@@ -0,0 +1,2171 @@
+package org.msf.records.ui.userlogin;%0A%0Aimport android.test.ActivityInstrumentationTestCase2;%0A%0Aimport org.msf.records.R;%0A%0Aimport java.util.Date;%0A%0Aimport static com.google.android.apps.common.testing.ui.espresso.Espresso.onView;%0Aimport static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click;%0Aimport static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.typeText;%0Aimport static com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions.matches;%0Aimport static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.isDisplayed;%0Aimport static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId;%0Aimport static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withText;%0A%0Apublic class UserLoginActivityTest extends%0A        ActivityInstrumentationTestCase2%3CUserLoginActivity%3E %7B%0A%0A    public UserLoginActivityTest() %7B%0A        super(UserLoginActivity.class);%0A    %7D%0A%0A    @Override%0A    public void setUp() throws Exception %7B%0A        super.setUp();%0A        getActivity();%0A    %7D%0A%0A    public void testAddUser() %7B%0A        String id = %22%22 + new Date().getTime() %25 1000;%0A        String username = %22user%22 + id;%0A        String given = %22Foo%22 + id;%0A        String family = %22Bar%22 + id;%0A        onView(withText(%22Add User%22)).perform(click());%0A        onView(withId(R.id.add_user_username_tv)).perform(typeText(username));%0A        onView(withId(R.id.add_user_given_name_tv)).perform(typeText(given));%0A        onView(withId(R.id.add_user_family_name_tv)).perform(typeText(family));%0A        onView(withText(%22OK%22)).perform(click());%0A        onView(withText(given + %22 %22 + family)).check(matches(isDisplayed()));%0A        onView(withText(%22FB%22)).check(matches(isDisplayed()));%0A        onView(withText(%22FB%22)).perform(click());%0A        onView(withText(%22MSF Medical Records%22)).check(matches(isDisplayed()));%0A        onView(withText(%22FB%22)).perform(click());%0A        onView(withText(given + %22 %22 + family)).check(matches(isDisplayed()));%0A        onView(withId(R.id.button_log_out)).perform(click());%0A        onView(withText(%22Add User%22)).check(matches(isDisplayed()));%0A    %7D%0A%7D%0A

Add a functional test for logging in and adding a user.