AudioEffects { public static AudioEffect getEffect(String name) { for (AudioEffect effect : getEffects()) { if (effect.getName().equals(name)) { return effect; } } return null; }  static Iterable<AudioEffect> getEffects(); static int countEffects(); static AudioEffect getEffect(String name);  }
@Test public void canGetByName() { String name = "Robot"; AudioEffect ae = AudioEffects.getEffect(name); assertNotNull(ae); assertEquals(name, ae.getName()); }
@Test public void canGetDefaultParams() { String name = "Robot"; String expected = "amount:100.0;"; String params = AudioEffects.getEffect(name).getExampleParameters(); assertEquals(expected, params); }