@Test(expected = IllegalArgumentException.class) public void shouldNotAllowCreationWithoutName() throws Exception { fireflyExtensionRepository.create(null); }
public FireflyExtensionModel create(String name) { Assert.hasText(name); FireflyExtensionModel result = new FireflyExtensionModel(); result.setName(name); result.setStates(new ArrayList<FireflyExtensionStateModel>()); return result; }
FireflyExtensionRepository { public FireflyExtensionModel create(String name) { Assert.hasText(name); FireflyExtensionModel result = new FireflyExtensionModel(); result.setName(name); result.setStates(new ArrayList<FireflyExtensionStateModel>()); return result; } }
FireflyExtensionRepository { public FireflyExtensionModel create(String name) { Assert.hasText(name); FireflyExtensionModel result = new FireflyExtensionModel(); result.setName(name); result.setStates(new ArrayList<FireflyExtensionStateModel>()); return result; }  }
FireflyExtensionRepository { public FireflyExtensionModel create(String name) { Assert.hasText(name); FireflyExtensionModel result = new FireflyExtensionModel(); result.setName(name); result.setStates(new ArrayList<FireflyExtensionStateModel>()); return result; }  FireflyExtensionModel findByName(String name); FireflyExtensionModel create(String name); void save(FireflyExtensionModel model); }
FireflyExtensionRepository { public FireflyExtensionModel create(String name) { Assert.hasText(name); FireflyExtensionModel result = new FireflyExtensionModel(); result.setName(name); result.setStates(new ArrayList<FireflyExtensionStateModel>()); return result; }  FireflyExtensionModel findByName(String name); FireflyExtensionModel create(String name); void save(FireflyExtensionModel model);  }