import org.junit.*;
import org.jmock.*;
import org.jmock.integration.junit4.*;
import static org.junit.Assert.*;

public class DeepThoughtTest {
    @Rule public JUnitRuleMockery context = new JUnitRuleMockery();

	AnswerSeeker answerSeeker = context.mock(AnswerSeeker.class);
	DeepThought deepThought = new DeepThought(answerSeeker);

	@Test
	public void life_the_universe_and_everything() throws Exception {
		context.checking(new Expectations() {{
			oneOf(answerSeeker).receiveAnswer(42);
		}});
		deepThought.computeForSevenMillionYears();
	}
}

import org.junit.*;
import org.jmock.*;
import org.jmock.integration.junit4.*;
import static org.junit.Assert.*;

public class DeepThoughtTest {
    @Rule public JUnitRuleMockery context = new JUnitRuleMockery();

    AnswerSeeker answerSeeker = context.mock(AnswerSeeker.class);
    DeepThought deepThought = new DeepThought(answerSeeker);

    @Test
    public void life_the_universe_and_everything() throws Exception {
        context.checking(new Expectations() {{
            oneOf(answerSeeker).receiveAnswer(42);
        }});
        deepThought.computeForSevenMillionYears();
    }
}

Change tabs to spaces