/*
 * 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.client.file.options;

import alluxio.CommonTestUtils;
import alluxio.thrift.MountTOptions;

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

/**
 * Tests for the {@link MountOptions} class.
 */
public final class MountOptionsTest {
  /**
   * Tests creating a default {@link MountOptions} instance.
   */
  @Test
  public void defaults() {
    MountOptions options = MountOptions.defaults();
    Assert.assertFalse(options.isReadOnly());
    Assert.assertFalse(options.isShared());
  }

  @Test
  public void readOnlyField() {
    Assert.assertTrue(MountOptions.defaults().setReadOnly(true).isReadOnly());
    Assert.assertFalse(MountOptions.defaults().setReadOnly(false).isReadOnly());
  }

  @Test
  public void sharedField() {
    Assert.assertTrue(MountOptions.defaults().setShared(true).isShared());
    Assert.assertFalse(MountOptions.defaults().setShared(false).isShared());
  }

  /**
   * Tests conversion to thrift representation.
   */
  @Test
  public void toThrift() {
    MountOptions options = MountOptions.defaults();
    MountTOptions thriftOptions = options.toThrift();
    Assert.assertFalse(thriftOptions.isReadOnly());

    options.setReadOnly(true);
    options.setShared(true);
    thriftOptions = options.toThrift();
    Assert.assertTrue(thriftOptions.isReadOnly());
    Assert.assertTrue(thriftOptions.isShared());
  }

  @Test
  public void equalsTest() throws Exception {
    CommonTestUtils.testEquals(MountOptions.class);
  }
}

@@ -541,24 +541,112 @@
 e.options;%0A%0A
+import static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0A
 import allux
@@ -707,33 +707,8 @@
 s;%0A%0A
-import org.junit.Assert;%0A
 impo
@@ -974,39 +974,32 @@
 defaults();%0A    
-Assert.
 assertFalse(opti
@@ -1013,39 +1013,32 @@
 eadOnly());%0A    
-Assert.
 assertFalse(opti
@@ -1095,39 +1095,32 @@
 lyField() %7B%0A    
-Assert.
 assertTrue(Mount
@@ -1167,39 +1167,32 @@
 eadOnly());%0A    
-Assert.
 assertFalse(Moun
@@ -1288,31 +1288,24 @@
 eld() %7B%0A    
-Assert.
 assertTrue(M
@@ -1356,31 +1356,24 @@
 red());%0A    
-Assert.
 assertFalse(
@@ -1632,31 +1632,24 @@
 rift();%0A    
-Assert.
 assertFalse(
@@ -1778,31 +1778,24 @@
 rift();%0A    
-Assert.
 assertTrue(t
@@ -1826,23 +1826,16 @@
 ));%0A    
-Assert.
 assertTr

Use static imports for standard test utilities in MountOptionsTest.java