protected Object createNewInstance(Erector erector) throws BlueprintTemplateException { return erector.createNewInstance(); }
@Test public void testBlueprintConstructorOnlyTriggeredOncePerCreateModelInvocation() throws Exception { Erector erector = mock(Erector.class); modelFactory.getErectors().put(Car.class, erector); modelFactory.createModel(Car.class); verify(erector, times(1)).createNewInstance(); } }