### Question:
FireflySystemFactory { public FireflySystem createFireflySystem() { return new FireflySystem(hybrisAdapter, createExtensions()); }  FireflySystem createFireflySystem(); void destroyFireflySystem(FireflySystem fireflySystem);  }### Answer:
@Test public void shouldAddExtensionsToSystem() throws Exception { FireflySystem fireflySystem = fireflySystemFactory.createFireflySystem(); assertNotNull(fireflySystem); assertFalse(fireflySystem.getExtensions().isEmpty()); }
@Test public void shouldRegisterFireflyForUpdateEvent() throws Exception { FireflySystem fireflySystem = fireflySystemFactory.createFireflySystem(); assertTrue(systemUpdateEventListener.isListenerRegistered(fireflySystem.getExtensions().get(0))); }
@Test public void shouldRegisterFireflyForResetEvent() throws Exception { FireflySystem fireflySystem = fireflySystemFactory.createFireflySystem(); assertTrue(hmcResetEventListener.isListenerRegistered(fireflySystem.getExtensions().get(0))); }