import org.junit.Test;
import mockit.Expectations;
import mockit.Injectable;
import mockit.Tested;
public class ExampleServiceTest {
@Tested
@Injectable
@Test
public void testDoSomething() {
new Expectations() {{
exampleDao.getSomething(); result = "mock result";
}};
String result = exampleService.doSomething();
new Verifications() {{
exampleDao.getSomething();
exampleDao.doSomething();
assertEquals("Expected result", result);
}};
}
}