}
@Test
public void add_zone_inside_form()
{
JavaScriptSupport js = mockJavaScriptSupport();
Environment environment = mockEnvironment();
FormSupport fs = mockFormSupport();
expect(environment.peek(FormSupport.class)).andReturn(fs).atLeastOnce();
expect(fs.getClientId()).andReturn("myform");
expect(fs.getFormComponentId()).andReturn("MyPage.myform");
JSONObject expected = new JSONObject(String.format(
"{element:'client1', parameters:{'%s': 'myform', '%s': 'MyPage.myform' }}",
RequestConstants.FORM_CLIENTID_PARAMETER, RequestConstants.FORM_COMPONENTID_PARAMETER));
js.addInitializerCall("zone", expected);
replay();
ClientBehaviorSupportImpl setup = new ClientBehaviorSupportImpl(js, environment);