@@ -0,0 +1,1821 @@
+package net.poksion.chorong.android.task;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0Aimport net.poksion.chorong.android.store.ObjectStore;%0Aimport net.poksion.chorong.android.store.ObjectStoreImpl;%0Aimport net.poksion.chorong.android.store.StoreAccessor;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Apublic class ObservingTaskTest %7B%0A    private ObjectStore.Key storeKey = new ObjectStore.Key(%22observing-task-test%22);%0A    private ObjectStore objectStore;%0A    private StoreAccessor%3CString%3E storeAccessor;%0A%0A    private final Object dummyListener = new Object();%0A    private TaskRunner%3CObject%3E taskRunner;%0A%0A    @Before%0A    public void setUp() %7B%0A        objectStore = new ObjectStoreImpl();%0A        storeAccessor = new StoreAccessor%3C%3E(storeKey, objectStore);%0A%0A        taskRunner = new TaskRunnerSync%3C%3E(dummyListener);%0A    %7D%0A%0A    @Test%0A    public void observing_task_should_know_related_store_changed() %7B%0A        taskRunner.registerObservingTask(new ObservingTask%3CString, Object%3E() %7B%0A            @Override%0A            public ObjectStore getStore() %7B%0A                return objectStore;%0A            %7D%0A%0A            @Override%0A            public String getStoreKey() %7B%0A                return storeKey.staticKey;%0A            %7D%0A%0A            @Override%0A            public boolean isAvailable(Object listener) %7B%0A                assertThat(listener).isEqualTo(dummyListener);%0A                return true;%0A            %7D%0A%0A            @Override%0A            public void onChanged(String s, Object listener) %7B%0A                assertThat(listener).isEqualTo(dummyListener);%0A%0A                String stored = storeAccessor.read();%0A                assertThat(stored).isEqualTo(%22observing-test%22);%0A                assertThat(s).isEqualTo(stored);%0A            %7D%0A        %7D);%0A%0A        storeAccessor.write(%22observing-test%22);%0A    %7D%0A%0A%7D%0A

add test for observing task