### Question:
PatternSetter implements IPatternSetter { public void setHiPattern(ProgressionUnitBar progressionUnitBar, Integer bpm) { for(int i=0; i<progressionUnitBar.getSynthTemplates().size(); i++) { if (progressionUnitBar.getHiSynthId().get(i) != progressionUnitBar.getSynthTemplates().get(i).getHiSynthId()) { progressionUnitBar.getPatternHi().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 ShouldSetHiPattern() { patternSetter.setHiPattern(pBar,BPM); Assert.assertTrue(pBar.getPatternHi().toString().contains("T80 Rw")); }
@Test public void ShouldSetHiAltPattern() { patternSetter.setHiPattern(pBar,BPM); Assert.assertTrue(pBar.getPatternHiAlt().get(0).toString().equalsIgnoreCase("Cmajw")); }