public void testNameMismatch() throws Exception
{
IRequestCycle cycle = newCycle();
Location l = fabricateLocation(1289);
IEngineService service = newService("actual-name");
EngineServiceContribution contribution = constructService("expected-name", service);
contribution.setLocation(l);
replayControls();
ServiceMapImpl m = new ServiceMapImpl();
m.setFactoryServices(Collections.singletonList(contribution));
m.setApplicationServices(Collections.EMPTY_LIST);
m.initializeService();
IEngineService proxy = m.getService("expected-name");
try
{
proxy.service(cycle);
unreachable();
}
catch (ApplicationRuntimeException ex)
{
assertEquals(