### Question:
MediumLevelFactory extends LevelFactory { public AbstractMediumLevel create(int level) { switch (level) { case 1: return new MediumLevelOne(); case 2: return new MediumLevelTwo(); case 3: return new MediumLevelThree(); default: return null; } }  AbstractMediumLevel create(int level);  }### Answer:
@Test public void createLevelOne() { assertThat(factory.create(1)).isInstanceOf(MediumLevelOne.class); }
@Test public void createLevelTwo() { assertThat(factory.create(2)).isInstanceOf(MediumLevelTwo.class); }
@Test public void createLevelThree() { assertThat(factory.create(3)).isInstanceOf(MediumLevelThree.class); }