title: How can I test fragments with Robolectric?
body: <p>I know there is a <code>Robolectric.shadowOf(Fragment)</code> method and a <code>ShadowFragment</code> class, thought they aren't listed on the docs, but I can't make it work.</p>
  
  <pre><code>myFragment = new MyFragment();
  myFragment.onCreateView(LayoutInflater.from(activity), (ViewGroup) activity.findViewById(R.id.container), null);
  myFragment.onAttach(activity);
  myFragment.onActivityCreated(null); 
  </code></pre>
  
  <p>I'm working with API level 13 (Honeycomb).</p>
  
  <p>Thanks.</p>