package com.jakubsprega.untestable.code.d;

import java.util.Date;
import java.util.List;

/**
 *
 * @author jakubsprega
 */
public class SonyPhone {
    
    public static boolean SERVICE_MODE = false;
    
    public void call(long number){
        System.out.println("Calling...");
        Call call = new OutgoingCall(number, new Date());
        PhoneSettings.getInstance().addRecentCall(call);
    }
    
    public void answer(IncomingCall call){
        System.out.println("Answering the phone...");
        PhoneSettings.getInstance().addRecentCall(call);
    }
    
    public List<Call> getRecentCalls(){
        return PhoneSettings.getInstance().getRecentCalls();
    }
}

@@ -41,31 +41,8 @@
 d;%0A%0A
-import java.util.Date;%0A
 impo
@@ -203,19 +203,33 @@
 all(
-long number
+OutgoingCall outgoingCall
 )%7B%0A 
@@ -273,66 +273,8 @@
 %22);%0A
-        Call call = new OutgoingCall(number, new Date());%0A
     
@@ -311,33 +311,41 @@
 ).addRecentCall(
-c
+outgoingC
 all);%0A    %7D%0A    

Improve d example