@Test
public void testTemplate() {

    TemplateLayout layout = new TemplateLayout(mContext, R.layout.test_template,
            R.id.suw_layout_content);
    View templateView = layout.findViewById(R.id.test_template_view);
    assertNotNull("@id/test_template_view should exist in template", templateView);
    TextView tv = new TextView(mContext);
    tv.setId(R.id.test_view_id);
    layout.addView(tv);
    templateView = layout.findViewById(R.id.test_template_view);
    assertNotNull("@id/test_template_view should exist in template", templateView);
    View contentView = layout.findViewById(R.id.test_view_id);
    assertSame("The view added should be the same text view", tv, contentView);
}