### Question:
ProgressBarMixin implements Mixin { public void setShown(boolean shown) { if (shown) { View progressBar = getProgressBar(); if (progressBar != null) { progressBar.setVisibility(View.VISIBLE); } } else { View progressBar = peekProgressBar(); if (progressBar != null) { progressBar.setVisibility(View.GONE); } } } ProgressBarMixin(TemplateLayout layout); boolean isShown(); void setShown(boolean shown); ProgressBar peekProgressBar(); void setColor(@Nullable ColorStateList color); @Nullable ColorStateList getColor();  }### Answer:
@Test public void testSetShown() { ProgressBarMixin mixin = new ProgressBarMixin(mTemplateLayout); mixin.setShown(true); ProgressBar progressBar = (ProgressBar) mTemplateLayout.findViewById(R.id.suw_layout_progress); assertNotNull("Progress bar should be available after setting to shown", progressBar); assertEquals(View.VISIBLE, progressBar.getVisibility()); }
@Test public void testNotShown() { ProgressBarMixin mixin = new ProgressBarMixin(mTemplateLayout); mixin.setShown(true); mixin.setShown(false); ProgressBar progressBar = (ProgressBar) mTemplateLayout.findViewById(R.id.suw_layout_progress); assertNotEquals(View.VISIBLE, progressBar.getVisibility()); }