### Question:
GadgetsHandlerService { @VisibleForTesting GadgetsHandlerApi.JsResponse createJsResponse(Uri url, Uri jsUri, String content, Set<String> fields, Long expireMs) { return (GadgetsHandlerApi.JsResponse) beanFilter.createFilteredBean( beanDelegator.createDelegator(null, GadgetsHandlerApi.JsResponse.class, ImmutableMap.<String, Object>builder() .put("url", BeanDelegator.nullable(url)) .put("error", BeanDelegator.NULL) .put("jsurl", jsUri) .put("jscontent", BeanDelegator.nullable(content)) .put("responsetimems", timeSource.currentTimeMillis()) .put("expiretimems", BeanDelegator.nullable(expireMs)).build()), fields); } @Inject  GadgetsHandlerService(TimeSource timeSource, Processor processor,
      IframeUriManager iframeUriManager, SecurityTokenCodec securityTokenCodec,
      ProxyUriManager proxyUriManager, JsUriManager jsUriManager, ProxyHandler proxyHandler,
      JsServingPipeline jsPipeline, JsRequestBuilder jsRequestBuilder,
      @Named("shindig.cache.xml.refreshInterval") long specRefreshInterval,
      BeanFilter beanFilter, CajaContentRewriter cajaContentRewriter,
      GadgetAdminStore gadgetAdminStore,
      FeatureRegistryProvider featureRegistryProvider,
      ModuleIdManager moduleIdManager,
      ContainerConfig config); GadgetsHandlerApi.MetadataResponse getMetadata(GadgetsHandlerApi.MetadataRequest request); GadgetsHandlerApi.TokenResponse getToken(GadgetsHandlerApi.TokenRequest request); GadgetsHandlerApi.JsResponse getJs(GadgetsHandlerApi.JsRequest request); GadgetsHandlerApi.ProxyResponse getProxy(GadgetsHandlerApi.ProxyRequest request); static GadgetsHandlerApi.MessageLevel convertMessageLevel(String name); GadgetsHandlerApi.CajaResponse getCaja(GadgetsHandlerApi.CajaRequest request); GadgetsHandlerApi.BaseResponse createErrorResponse(Uri uri, Exception e,
      String defaultMsg); GadgetsHandlerApi.BaseResponse createErrorResponse(Uri url, int code, String error);  }### Answer:
@Test public void testCreateJsResponse() throws Exception { Uri jsUri = Uri.parse("http: String content = "content"; GadgetsHandlerApi.JsResponse jsResponse = gadgetHandler.createJsResponse(null, jsUri, content, ImmutableSet.of("*"), null); BeanDelegator.validateDelegator(jsResponse); }