### Question:
GadgetsHandler { @VisibleForTesting static GadgetsHandlerApi.RenderingType getRenderingType(String value) throws ProcessingException { GadgetsHandlerApi.RenderingType type = GadgetsHandlerApi.RenderingType.DEFAULT; if (value != null) { try { type = GadgetsHandlerApi.RenderingType.valueOf(value.toUpperCase()); } catch (IllegalArgumentException e) { throw new ProcessingException("Error parsing rendering type parameter", HttpServletResponse.SC_BAD_REQUEST); } } return type; } @Inject  GadgetsHandler(ExecutorService executor,
                        GadgetsHandlerService handlerService,
                        BeanFilter beanFilter); @Operation(httpMethods = {"POST", "GET"}, path = "metadata") Map<String, GadgetsHandlerApi.BaseResponse> metadata(BaseRequestItem request); @Operation(httpMethods = {"POST", "GET"}, path = "token") Map<String, GadgetsHandlerApi.BaseResponse> token(BaseRequestItem request); @Operation(httpMethods = {"POST", "GET"}, path = "js") GadgetsHandlerApi.BaseResponse js(BaseRequestItem request); @Operation(httpMethods = {"POST", "GET"}, path = "proxy") Map<String, GadgetsHandlerApi.BaseResponse> proxy(BaseRequestItem request); @Operation(httpMethods = {"POST", "GET"}, path = "cajole") Map<String, GadgetsHandlerApi.BaseResponse> cajole(BaseRequestItem request); @Operation(httpMethods = "GET", path = "/@metadata.supportedFields") Set<String> supportedFields(RequestItem request); @Operation(httpMethods = "GET", path = "/@token.supportedFields") Set<String> tokenSupportedFields(RequestItem request); @Operation(httpMethods = "GET", path = "/@js.supportedFields") Set<String> jsSupportedFields(RequestItem request); @Operation(httpMethods = "GET", path = "/@proxy.supportedFields") Set<String> proxySupportedFields(RequestItem request); @Operation(httpMethods = "GET", path = "/@cajole.supportedFields") Set<String> cajaSupportedFields(RequestItem request);  }### Answer:
@Test public void testGetRenderingType() throws Exception { assertEquals(GadgetsHandlerApi.RenderingType.DEFAULT, GadgetsHandler.getRenderingType(null)); assertEquals(GadgetsHandlerApi.RenderingType.SANITIZED, GadgetsHandler.getRenderingType("sanitized")); assertEquals(GadgetsHandlerApi.RenderingType.INLINE_CAJOLED, GadgetsHandler.getRenderingType("inline_cajoled")); try { GadgetsHandler.getRenderingType("unknown"); fail("Should have failed"); } catch (ProcessingException e) { } }