IntelliJCoderServer server = new IntelliJCoderServer(workspaceManager, new Network());
int port = server.start();
setSystemProperty(ArenaProcessLauncher.INTELLIJCODER_PORT_PROPERTY, port);
IntelliJCoderArenaPlugin plugin = new IntelliJCoderArenaPlugin();
plugin.startUsing();
final ProblemComponentModel inputComponentModel = context.mock(ProblemComponentModel.class);
context.checking(new Expectations(){{
allowing(inputComponentModel).getClassName(); will(returnValue("BinaryCode"));
allowing(inputComponentModel).getReturnType(); will(returnValue(new DataType("int")));
allowing(inputComponentModel).getMethodName(); will(returnValue("multiply"));
allowing(inputComponentModel).getParamTypes(); will(returnValue(new DataType[0]));
allowing(inputComponentModel).getParamNames(); will(returnValue(new String[0]));
allowing(inputComponentModel).getTestCases(); will(returnValue(new com.topcoder.shared.problem.TestCase[] {new com.topcoder.shared.problem.TestCase(1, new String[0], "1", false)}));
}});
TestCase testCase = make(a(TestCase, with(input, new String[0]), with(output, "1")));
Problem expectedProblem = make(a(Problem,
with(className, "BinaryCode"),
with(returnType, "int"),
with(methodName, "multiply"),
with(testCases, new TestCase[]{testCase})));
plugin.setProblemComponent(inputComponentModel, JavaLanguage.JAVA_LANGUAGE, null);
workspaceManager.hasReceivedProblemEqualTo(expectedProblem);
}