### Question:
GlifLayout extends TemplateLayout { public ProgressBar peekProgressBar() { return getMixin(ProgressBarMixin.class).peekProgressBar(); } GlifLayout(Context context);  GlifLayout(Context context, int template);  GlifLayout(Context context, int template, int containerId);  GlifLayout(Context context, AttributeSet attrs); @TargetApi(VERSION_CODES.HONEYCOMB)  GlifLayout(Context context, AttributeSet attrs, int defStyleAttr); View inflateFooter(@LayoutRes int footer); View inflateStickyHeader(@LayoutRes int header); ScrollView getScrollView(); TextView getHeaderTextView(); void setHeaderText(int title); void setHeaderText(CharSequence title); CharSequence getHeaderText(); void setHeaderColor(ColorStateList color); ColorStateList getHeaderColor(); void setIcon(Drawable icon); Drawable getIcon(); void setPrimaryColor(@NonNull ColorStateList color); ColorStateList getPrimaryColor(); void setBackgroundBaseColor(@Nullable ColorStateList color); @Nullable ColorStateList getBackgroundBaseColor(); void setBackgroundPatterned(boolean patterned); boolean isBackgroundPatterned(); boolean isProgressBarShown(); void setProgressBarShown(boolean shown); ProgressBar peekProgressBar();  }### Answer:
@Test public void testPeekProgressBarNull() { GlifLayout layout = new GlifLayout(mContext); assertNull("PeekProgressBar should return null initially", layout.peekProgressBar()); }
@Test public void testPeekProgressBar() { GlifLayout layout = new GlifLayout(mContext); layout.setProgressBarShown(true); assertNotNull("Peek progress bar should return the bar after setProgressBarShown(true)", layout.peekProgressBar()); }
@Test public void testPeekProgressBarNull() { GlifLayout layout = new GlifLayout(context); assertWithMessage("PeekProgressBar should return null initially") .that(layout.peekProgressBar()) .isNull(); }
@Test public void testPeekProgressBar() { GlifLayout layout = new GlifLayout(context); layout.setProgressBarShown(true); assertWithMessage("Peek progress bar should return the bar after setProgressBarShown(true)") .that(layout.peekProgressBar()) .isNotNull(); }