@@ -0,0 +1,1380 @@
+package com.ae.apps.tripmeter.activities;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0Aimport android.support.test.rule.ActivityTestRule;%0Aimport android.support.test.runner.AndroidJUnit4;%0A%0A@RunWith(AndroidJUnit4.class)%0Apublic class FuelCalcTest %7B%0A%0A    @Rule%0A    public ActivityTestRule%3CMainActivity%3E mActivityRule = new ActivityTestRule%3C%3E(%0A            MainActivity.class);%0A%0A    @Test%0A    public void testTotalFuelAndPrice() %7B%0A%09%09String distance = %22100%22;%0A%09%09String fuelPrice = %2270%22;%0A%09%09String mileage = %2220%22;%0A%09%09%0A        // Type text and then press the button.%0A        onView(withId(R.id.txtDistance))%0A                .perform(typeText(distance), closeSoftKeyboard());%0A%09%09    onView(withId(R.id.txtFuelPrice))%0A                .perform(typeText(fuelPrice), closeSoftKeyboard());%0A%09%09    onView(withId(R.id.txtMileage))%0A                .perform(typeText(mileage), closeSoftKeyboard());%0A%09%09%09%09%0A        onView(withId(R.id.btnCalculate)).perform(click());%0A%0A        // Check that the text was changed.%0A%09%09    String expectedFuelNeeded = %22Fuel Needed 5.00%22;%0A%09%09    String expectedFuelPrice = %22Total Fuel Price 350.00%22;%0A%09%09%0A        onView(withId(R.id.lblFuelNeeded))%0A                .check(matches(withText(expectedFuelNeeded)));%0A%09%09    onView(withId(R.id.lblTotalCost))%0A                .check(matches(withText(expectedFuelPrice)));%0A    %7D%0A%7D%0A

Create FuelCalcTest.java