/*
 * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
 * (the "License"). You may not use this work except in compliance with the License, which is
 * available at www.apache.org/licenses/LICENSE-2.0
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied, as more fully set forth in the License.
 *
 * See the NOTICE file distributed with this work for information regarding copyright ownership.
 */

package alluxio.util;

import alluxio.ConfigurationTestUtils;
import alluxio.conf.InstancedConfiguration;
import alluxio.grpc.DeletePOptions;
import alluxio.grpc.LoadDescendantPType;
import alluxio.grpc.LoadMetadataPOptions;
import alluxio.grpc.MountPOptions;
import alluxio.grpc.SetAclPOptions;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

public class FileSystemOptionsTest {

  private InstancedConfiguration mConf;

  @Before
  public void before() throws Exception {
    mConf = ConfigurationTestUtils.defaults();
  }

  @Test
  public void loadMetadataOptionsDefaults() {
    LoadMetadataPOptions options = FileSystemOptions.loadMetadataDefaults(mConf);
    Assert.assertNotNull(options);
    Assert.assertFalse(options.getRecursive());
    Assert.assertFalse(options.getCreateAncestors());
    Assert.assertEquals(options.getLoadDescendantType(), LoadDescendantPType.NONE);
  }

  @Test
  public void deleteOptionsDefaults() {
    DeletePOptions options = FileSystemOptions.deleteDefaults(mConf);
    Assert.assertNotNull(options);
    Assert.assertFalse(options.getRecursive());
    Assert.assertFalse(options.getAlluxioOnly());
    Assert.assertFalse(options.getUnchecked());
  }

  @Test
  public void mountOptionsDefaults() {
    MountPOptions options = FileSystemOptions.mountDefaults(mConf);
    Assert.assertNotNull(options);
    Assert.assertFalse(options.getShared());
    Assert.assertFalse(options.getReadOnly());
    Assert.assertEquals(0, options.getPropertiesMap().size());
  }

  @Test
  public void setAclOptionsDefaults() {
    SetAclPOptions options = FileSystemOptions.setAclDefaults(mConf);
    Assert.assertNotNull(options);
    Assert.assertFalse(options.getRecursive());
  }
}

@@ -530,16 +530,152 @@
 .util;%0A%0A
+import static org.junit.Assert.assertNotNull;%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertEquals;%0A%0A
 import a
@@ -944,33 +944,8 @@
 s;%0A%0A
-import org.junit.Assert;%0A
 impo
@@ -1304,39 +1304,32 @@
 lts(mConf);%0A    
-Assert.
 assertNotNull(op
@@ -1332,39 +1332,32 @@
 l(options);%0A    
-Assert.
 assertFalse(opti
@@ -1373,39 +1373,32 @@
 cursive());%0A    
-Assert.
 assertFalse(opti
@@ -1420,39 +1420,32 @@
 cestors());%0A    
-Assert.
 assertEquals(opt
@@ -1620,39 +1620,32 @@
 lts(mConf);%0A    
-Assert.
 assertNotNull(op
@@ -1648,39 +1648,32 @@
 l(options);%0A    
-Assert.
 assertFalse(opti
@@ -1689,39 +1689,32 @@
 cursive());%0A    
-Assert.
 assertFalse(opti
@@ -1732,39 +1732,32 @@
 xioOnly());%0A    
-Assert.
 assertFalse(opti
@@ -1893,39 +1893,32 @@
 lts(mConf);%0A    
-Assert.
 assertNotNull(op
@@ -1921,39 +1921,32 @@
 l(options);%0A    
-Assert.
 assertFalse(opti
@@ -1963,31 +1963,24 @@
 red());%0A    
-Assert.
 assertFalse(
@@ -2003,31 +2003,24 @@
 nly());%0A    
-Assert.
 assertEquals
@@ -2182,31 +2182,24 @@
 mConf);%0A    
-Assert.
 assertNotNul
@@ -2214,23 +2214,16 @@
 s);%0A    
-Assert.
 assertFa

Use static test imports in FileSystemOptionsTest