Environments { public static Set<String> getJavaCapabilities() { ImmutableSet.Builder<String> capabilities = ImmutableSet.builder(); capabilities.addAll(ModelCoders.urns()); capabilities.add(BeamUrns.getUrn(StandardProtocols.Enum.MULTI_CORE_BUNDLE_PROCESSING)); capabilities.add(BeamUrns.getUrn(StandardProtocols.Enum.PROGRESS_REPORTING)); capabilities.add("beam:version:sdk_base:" + JAVA_SDK_HARNESS_CONTAINER_URL); capabilities.add(BeamUrns.getUrn(SplittableParDoComponents.TRUNCATE_SIZED_RESTRICTION)); return capabilities.build(); } private  Environments(); static Environment createOrGetDefaultEnvironment(PortablePipelineOptions options); static Environment createDockerEnvironment(String dockerImageUrl); static Environment createProcessEnvironment(
      String os, String arch, String command, Map<String, String> env); static Optional<Environment> getEnvironment(String ptransformId, Components components); static Optional<Environment> getEnvironment(
      PTransform ptransform, RehydratedComponents components); static List<ArtifactInformation> getArtifacts(List<String> stagingFiles); static List<ArtifactInformation> getDeferredArtifacts(PipelineOptions options); static Set<String> getJavaCapabilities(); static JavaVersion getJavaVersion(); static String createStagingFileName(File path, HashCode hash); static final String ENVIRONMENT_DOCKER; static final String ENVIRONMENT_PROCESS; static final String ENVIRONMENT_EXTERNAL; static final String ENVIRONMENT_EMBEDDED; static final String ENVIRONMENT_LOOPBACK; static final Environment JAVA_SDK_HARNESS_ENVIRONMENT; }
@Test public void testCapabilities() { assertThat(Environments.getJavaCapabilities(), hasItem(ModelCoders.LENGTH_PREFIX_CODER_URN)); assertThat(Environments.getJavaCapabilities(), hasItem(ModelCoders.ROW_CODER_URN)); assertThat( Environments.getJavaCapabilities(), hasItem(BeamUrns.getUrn(RunnerApi.StandardProtocols.Enum.MULTI_CORE_BUNDLE_PROCESSING))); assertThat( Environments.getJavaCapabilities(), hasItem( BeamUrns.getUrn( RunnerApi.StandardPTransforms.SplittableParDoComponents .TRUNCATE_SIZED_RESTRICTION))); }