@Test public void createLevelTwo() { assertThat(factory.create(2)).isInstanceOf(EasyLevelTwo.class); }
public AbstractEasyLevel create(int level) { switch (level) { case 1: return new EasyLevelOne(); case 2: return new EasyLevelTwo(); case 3: return new EasyLevelThree(); default: return null; } }
EasyLevelFactory extends LevelFactory { public AbstractEasyLevel create(int level) { switch (level) { case 1: return new EasyLevelOne(); case 2: return new EasyLevelTwo(); case 3: return new EasyLevelThree(); default: return null; } } }
EasyLevelFactory extends LevelFactory { public AbstractEasyLevel create(int level) { switch (level) { case 1: return new EasyLevelOne(); case 2: return new EasyLevelTwo(); case 3: return new EasyLevelThree(); default: return null; } }  }
EasyLevelFactory extends LevelFactory { public AbstractEasyLevel create(int level) { switch (level) { case 1: return new EasyLevelOne(); case 2: return new EasyLevelTwo(); case 3: return new EasyLevelThree(); default: return null; } }  AbstractEasyLevel create(int level); }
EasyLevelFactory extends LevelFactory { public AbstractEasyLevel create(int level) { switch (level) { case 1: return new EasyLevelOne(); case 2: return new EasyLevelTwo(); case 3: return new EasyLevelThree(); default: return null; } }  AbstractEasyLevel create(int level);  }