### Question:
FireflySystem { public boolean isUpdateRequired() { boolean updateRequired = false; Iterator<FireflyExtension> extensionIterator = extensions.iterator(); while (!updateRequired && extensionIterator.hasNext()) { updateRequired = extensionIterator.next().isUpdateRequired(); } return updateRequired; } FireflySystem(HybrisAdapter hybrisAdapter, List<FireflyExtension> extensions); void update(FireflyMigrationModel migration); void setBaseline(FireflyMigrationModel migration); boolean isHmcResetRequired(); boolean isUpdateRequired(); Map<String, File> getExtensionPaths();  }### Answer:
@Test public void shouldRequireUpdate() throws Exception { given(extensionAlice.isUpdateRequired()).willReturn(true); boolean updateRequired = fireflySystem.isUpdateRequired(); assertTrue(updateRequired); }
@Test public void shouldNotRequireUpdate() throws Exception { given(extensionAlice.isUpdateRequired()).willReturn(false); given(extensionBob.isUpdateRequired()).willReturn(false); boolean updateRequired = fireflySystem.isUpdateRequired(); assertFalse(updateRequired); }