anchor.diff:  %% @end
   %%--------------------------------------------------------------------
   handle_cast(_Msg, State) ->
  -    lager:info("test"),
       {noreply, State}.
   
   %%--------------------------------------------------------------------
  
positive.code: %%                                   {stop, Reason, State}
  %% @end
  %%--------------------------------------------------------------------
  handle_call({add, TaskName, Schedule, Detail}, _From, State = #state{ tasks = Tasks }) ->
      %% TODO: receive a message from task worker
      NewTasks = dict:store(TaskName, {Schedule, Detail}, Tasks),
      lager:info("adds a task: {~p, ~p, ~p}", [TaskName, Schedule, Detail]),
      {reply, ok, State#state{ tasks = NewTasks }};
  handle_call({cancel, TaskName}, _From, State) ->
      %% TODO: receive a message from task worker
      NewTasks = dict:erase(TaskName, State#state.tasks),
      {reply, ok, State#state{ tasks = NewTasks }};
  handle_call({show, all}, _From, State) ->
      {reply, format_schedules(dict:to_list(State#state.tasks)), State};
  handle_call({show, TaskName}, _From, State) ->
      case dict:find(TaskName, State#state.tasks) of
          error -> 
  
negative.code: %%% Internal functions
  %%%===================================================================
  
  -spec format_tasks([task()]) -> binary().
  format_tasks(Tasks) ->
      lists:foldl(fun(X, Acc) -> Line = format_task(X),
                                 << Acc/binary, Line/binary >>
                  end, <<>>, Tasks). 
  
  -spec format_task(task()) -> binary().
  format_task({TaskName, {Schedule, Detail}}) ->
      <<TaskName/binary, "\t\t", Schedule/binary, "\t\t", Detail/binary, "\n">>.
  