package codekata;

import static org.junit.Assert.*;

import org.junit.Test;


public class DeviceDriverTest {

    @Test
    public void read_From_Hardware() {
        FlashMemoryDevice hardware = new MockFlashMemoryDevice();
        DeviceDriver driver = new DeviceDriver(hardware);
        byte data = driver.read(0xFF);
        assertEquals(0, data);
    }

}

class MockFlashMemoryDevice implements FlashMemoryDevice {

    public byte read(long address) {
        return 0;
    }

    public void write(long address, byte data) {

    }
}

@@ -166,45 +166,61 @@
     
-FlashMemoryDevice hardware = new Mock
+// TODO: replace hardware with a Test Double%0A        
 Flas
@@ -232,18 +232,32 @@
 ryDevice
-()
+ hardware = null
 ;%0A      
@@ -347,16 +347,16 @@
 (0xFF);%0A
+
         
@@ -387,189 +387,7 @@
    %7D
-%0A%0A%7D%0A%0Aclass MockFlashMemoryDevice implements FlashMemoryDevice %7B%0A%0A    public byte read(long address) %7B%0A        return 0;%0A    %7D%0A%0A    public void write(long address, byte data) %7B%0A%0A    %7D
 %0A%7D%0A

change starting position for java so you get to implement the test double however you want