<commit_before>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) {

    }
}<commit_msg>change starting position for java so you get to implement the test double however you want<commit_after>package codekata;

import static org.junit.Assert.*;

import org.junit.Test;


public class DeviceDriverTest {

    @Test
    public void read_From_Hardware() {
        // TODO: replace hardware with a Test Double
        FlashMemoryDevice hardware = null;
        DeviceDriver driver = new DeviceDriver(hardware);
        byte data = driver.read(0xFF);
        assertEquals(0, data);
    }
}
{'fraction_non_alphanumeric': 0.07966260543580131, 'fraction_numerical': 0.004686035613870665, 'mean_word_length': 3.1076923076923078, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6640019', 'n_tokens_mistral': 296, 'n_tokens_neox': 284, 'n_words': 91}