GcsPathValidator implements PathValidator { @Override public void validateOutputFilePrefixSupported(String filePrefix) { verifyPath(filePrefix); verifyPathIsAccessible(filePrefix, "Output path does not exist or is not writeable: %s"); } private  GcsPathValidator(GcsOptions options); static GcsPathValidator fromOptions(PipelineOptions options); @Override void validateInputFilePatternSupported(String filepattern); @Override void validateOutputFilePrefixSupported(String filePrefix); @Override void validateOutputResourceSupported(ResourceId resourceId); @Override String verifyPath(String path);  }
@Test public void testValidOutputPrefix() { validator.validateOutputFilePrefixSupported("gs: }
@Test public void testInvalidOutputPrefix() { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("Expected a valid 'gs: validator.validateOutputFilePrefixSupported("/local/path"); }
@Test public void testOutputPrefixMissingBucket() { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage( "Missing object or bucket in path: 'gs: + "did you mean: 'gs: validator.validateOutputFilePrefixSupported("gs: }
@Test public void testInvalidOutputPrefix() { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage( "Expected a valid 'gs: validator.validateOutputFilePrefixSupported("/local/path"); }