@@ -0,0 +1,1178 @@
+package nl.dvberkel.brainfuck;%0A%0Aimport nl.dvberkel.brainfuck.language.Program;%0Aimport nl.dvberkel.brainfuck.machine.BrainfuckMachine;%0Aimport nl.dvberkel.brainfuck.parser.BrainfuckParser;%0Aimport nl.dvberkel.util.AlwaysOne;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.OutputStream;%0A%0Aimport static nl.dvberkel.util.ByteArrayFactory.ofLength;%0Aimport static org.hamcrest.core.Is.is;%0Aimport static org.junit.Assert.assertThat;%0A%0Apublic class ComponentTest %7B%0A    private static final int CELL_LENGTH = 10;%0A    private BrainfuckParser parser;%0A    private BrainfuckMachine machine;%0A    private ByteArrayOutputStream output;%0A%0A    @Before%0A    public void createParser() %7B%0A        parser = new BrainfuckParser();%0A    %7D%0A    %0A    @Before%0A    public void createMachine() %7B%0A        output = new ByteArrayOutputStream();%0A        machine = new BrainfuckMachine(CELL_LENGTH, new AlwaysOne(), output);%0A    %7D%0A%0A    @Test%0A    public void shouldParseAndExecuteCorrectly() %7B%0A        Program p = parser.parse(%22+%3E++%3E+++%22);%0A        %0A        p.executeOn(machine);%0A%0A        assertThat(machine.getCells(), is(ofLength(10).withContent(1,2,3)));%0A    %7D%0A%7D%0A

create a component test