@@ -0,0 +1,1176 @@
+package com.android21buttons.fragmenttestrule;%0A%0Aimport android.support.v4.app.Fragment;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.CoreMatchers.notNullValue;%0Aimport static org.hamcrest.CoreMatchers.nullValue;%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0A%0Apublic class FragmentTestRuleTest %7B%0A    @Before%0A    public void setUp() throws Exception %7B%0A%0A    %7D%0A%0A    @Test%0A    public void createFragment() throws Exception %7B%0A        FragmentTestRule%3C?, Fragment%3E testRule = FragmentTestRule.create(Fragment.class);%0A%0A        assertThat(testRule.createFragment(), is(notNullValue()));%0A    %7D%0A%0A    @Test%0A    public void getFragmentCreate() throws Exception %7B%0A        FragmentTestRule%3C?, Fragment%3E testRule = FragmentTestRule.create(Fragment.class);%0A%0A        final Fragment fragment = testRule.createFragment();%0A        assertThat(testRule.getFragment(), is(fragment));%0A    %7D%0A%0A    @Test%0A    public void getFragmentNoCreate() throws Exception %7B%0A        FragmentTestRule%3C?, Fragment%3E testRule = FragmentTestRule.create(Fragment.class);%0A%0A        assertThat(testRule.getFragment(), is(nullValue()));%0A    %7D%0A%7D%0A

Add some tests