assertNull(t.translate(null, null, null, null));
}
public void testBadClass() throws Exception
{
InstanceTranslator t = new InstanceTranslator();
ElementImpl e = new ElementImpl();
Location l = new LocationImpl(getResource("TestInstanceTranslator.class"), 50);
e.setLocation(l);
MockControl c = newControl(Module.class);
Module m = (Module) c.getMock();
m.resolveType("bad.class.Name");
ApplicationRuntimeException cause = new ApplicationRuntimeException("failure");
c.setThrowable(cause);
replayControls();
try
{
t.translate(m, null, "bad.class.Name", null);
}
catch (ApplicationRuntimeException ex)
{
assertSame(cause, ex);
}