code: private ViewableContext getViewableContext() {
          final Set<ViewableContext> customProviders =
                  Providers.getCustomProviders(injectionManager, ViewableContext.class);
          if (!customProviders.isEmpty()) {
              return customProviders.iterator().next();
          }
          return Providers.getProviders(injectionManager, ViewableContext.class).iterator().next();
      }
docs: Get {@link org.glassfish.jersey.server.mvc.spi.ViewableContext viewable context}.
  User defined (custom) contexts have higher priority than the default ones
  (i.e. {@link ResolvingViewableContext}).
  
  @return {@code non-null} viewable context.