@@ -0,0 +1,1215 @@
+package com.github.dddpaul.netcat;%0A%0Aimport android.widget.AutoCompleteTextView;%0Aimport android.widget.Button;%0A%0Aimport com.github.dddpaul.netcat.ui.MainFragment;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.robolectric.RobolectricTestRunner;%0Aimport org.robolectric.annotation.Config;%0A%0Aimport static org.robolectric.util.FragmentTestUtil.startFragment;%0A%0A@Config( emulateSdk = 18 )%0A@RunWith( RobolectricTestRunner.class )%0Apublic class MainFragmentTest extends Assert%0A%7B%0A    private MainFragment fragment;%0A%0A    @Before%0A    public void setUp()%0A    %7B%0A        fragment = new MainFragment();%0A    %7D%0A%0A    /**%0A     * Test connect button behaviour%0A     */%0A    @Test%0A    public void testConnectToButton()%0A    %7B%0A        startFragment( fragment );%0A        Button connectButton = (Button) fragment.getView().findViewById( R.id.b_connect );%0A%0A        assertNotNull( connectButton );%0A        assertFalse( connectButton.isEnabled() );%0A%0A        AutoCompleteTextView connectToText = (AutoCompleteTextView) fragment.getView().findViewById( R.id.et_connect_to );%0A        connectToText.setText( %22some host%22 );%0A%0A        assertTrue( connectButton.isEnabled() );%0A    %7D%0A%7D%0A

Create sample fragment test