@@ -0,0 +1,1893 @@
+/*%0A * Copyright 2019 Google Inc. All Rights Reserved.%0A *%0A *  Licensed under the Apache License, Version 2.0 (the %22License%22); you may not use this file except%0A * in compliance with the License. You may obtain a copy of the License at%0A *%0A *  http://www.apache.org/licenses/LICENSE-2.0%0A *%0A *  Unless required by applicable law or agreed to in writing, software distributed under the%0A * License is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either%0A * express or implied. See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.google.cloud.hadoop.fs.gcs;%0A%0Aimport static com.google.common.truth.Truth.assertThat;%0Aimport static org.junit.Assert.assertThrows;%0A%0Aimport com.google.common.collect.ImmutableSet;%0Aimport java.io.FileNotFoundException;%0Aimport org.apache.hadoop.conf.Configuration;%0Aimport org.apache.hadoop.fs.FileSystem;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.JUnit4;%0A%0A/** Unit tests for %7B@link InMemoryGlobberFileSystem%7D class. */%0A@RunWith(JUnit4.class)%0Apublic class InMemoryGlobberFileSystemTest %7B%0A%0A  @Test%0A  public void testGetFileStatus_shouldReturnExceptionForNotExistingFile() throws Exception %7B%0A    GoogleHadoopFileSystem ghfs = new InMemoryGoogleHadoopFileSystem();%0A%0A    FileSystem helperFileSystem =%0A        InMemoryGlobberFileSystem.createInstance(%0A            new Configuration(), ghfs.getWorkingDirectory(), ImmutableSet.of());%0A%0A    FileNotFoundException e =%0A        assertThrows(%0A            FileNotFoundException.class,%0A            () -%3E helperFileSystem.getFileStatus(ghfs.getWorkingDirectory()));%0A%0A    assertThat(e)%0A        .hasMessageThat()%0A        .startsWith(%0A            String.format(%0A                %22Path '%25s' (qualified: '%25s') does not exist.%22,%0A                ghfs.getWorkingDirectory(), ghfs.getWorkingDirectory()));%0A  %7D%0A%7D%0A

Test for InMemoryGlobberFileSystem (#167)