2 Minutes To Code (β Version)

Easymock - 2 minute tutorial

How to create mock of an interface

Easymock lets you create mock of an interface by using the method createMock(...) of class org.easymock.EasyMock.

See example code of how this is done below.
package com.techfundaes.easymockBag;

import java.util.List;

import static org.easymock.EasyMock.*;

public class CreateMockOfInterface
	public static void main(String[] args)
		List myList = createMock(List.class);