### Question:
HardLevelFactory extends LevelFactory { public AbstractHardLevel create(int level) { switch (level) { case 1: return new HardLevelOne(); case 2: return new HardLevelTwo(); case 3: return new HardLevelThree(); default: return null; } }  AbstractHardLevel create(int level);  }### Answer:
@Test public void createLevelOne() { assertThat(factory.create(1)).isInstanceOf(HardLevelOne.class); }
@Test public void createLevelTwo() { assertThat(factory.create(2)).isInstanceOf(HardLevelTwo.class); }
@Test public void createLevelThree() { assertThat(factory.create(3)).isInstanceOf(HardLevelThree.class); }