Started to move the logic of attaching city clocks and updating the time of all these clocks from class PhoneClock to a new class WorldClockSystem. Attached london clock object to world clock system object and injected worldClockSystem into phoneClock in the test code.
Created local variable worldClockSystem in the test and created class WorldClockSystem.
Created method WorldClockSystem.attach().
Created method PhoneClock.setWorldClockSystem().
Added a city clock to a list in the method WorldClockSystem.attach().
Created a List field cityClocks in class WorldClockSystem.
Added a TODO in class PhoneClock: The local time of the PhoneClock object should be set. Add a test for it at first.
Delegated updating all clock time to class WorldClockSystem in PhoneClock.setLocalTime().
Created field worldClockSystem and assigned a value to it in the setter.
Created and implemented method WorldClockSystem.updateAllClockTime().
Created parameter utcZeroTime in method WorldClockSystem.updateAllClockTime().
Assigned the correct UTC zero time for the actual parameter of method WorldClockSystem.updateAllClockTime().
Made all tests use the new interface of class WorldClockSystem.
Removed all the old 'hotelWorldClocks' related code from the test.
Removed the old 'hotelWorldClocks' code from class PhoneClock."
Refactored the local variable worldClockSystem to the field in the test.
Removed all other duplicated code from the test.
Added a test the_time_of_phone_clock_should_be_9_after_it_is_set_to_9_Beijing_time() and wrote an assertion for it.
Added an action for test the_time_of_phone_clock_should_be_9_after_it_is_set_to_9_Beijing_time().
Created method PhoneClock.getLocalTime() and returned a hard-coded value in it.