### Question:
PatternSetter implements IPatternSetter { public void setAltMidPattern(ProgressionUnitBar progressionUnitBar, Integer bpm) { for(int i=0; i<progressionUnitBar.getSynthTemplates().size(); i++) { if (progressionUnitBar.getMidSynthId().get(i) != progressionUnitBar.getSynthTemplates().get(i).getMidSynthIdAlt()) { progressionUnitBar.getPatternMidAlt().set(i, generateRests(2, bpm).setTempo(bpm)); } } }  void setHiPattern(ProgressionUnitBar progressionUnitBar, Integer bpm); void setAltHiPattern(ProgressionUnitBar progressionUnitBar, Integer bpm); void setMidPattern(ProgressionUnitBar progressionUnitBar, Integer bpm); void setAltMidPattern(ProgressionUnitBar progressionUnitBar, Integer bpm); void setLowPattern(ProgressionUnitBar progressionUnitBar, Integer bpm); void setAltLowPattern(ProgressionUnitBar progressionUnitBar, Integer bpm); Pattern generateBarRest(Integer bpm); Pattern generateRests(int barCount, Integer bpm);  }### Answer:
@Test public void ShouldSetMidAltPattern() { patternSetter.setAltMidPattern(pBar,BPM); Assert.assertTrue(pBar.getPatternMidAlt().get(0).toString().contains("T80 Rw")); }