@@ -0,0 +1,2243 @@
+/*%0A * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0%0A * (the %22License%22). You may not use this work except in compliance with the License, which is%0A * available at www.apache.org/licenses/LICENSE-2.0%0A *%0A * This software is distributed on an %22AS IS%22 basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,%0A * either express or implied, as more fully set forth in the License.%0A *%0A * See the NOTICE file distributed with this work for information regarding copyright ownership.%0A */%0A%0Apackage alluxio.client.block.options;%0A%0Aimport alluxio.CommonTestUtils;%0Aimport alluxio.thrift.LockBlockTOptions;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.powermock.api.mockito.PowerMockito;%0Aimport org.powermock.core.classloader.annotations.PrepareForTest;%0Aimport org.powermock.modules.junit4.PowerMockRunner;%0A%0A/**%0A * Tests for the %7B@link LockBlockOptions%7D class.%0A * @author gurmeetb%0A *%0A */%0A@RunWith(PowerMockRunner.class)%0A@PrepareForTest(%7BLockBlockTOptions.class%7D)%0Apublic class LockBlockOptionsTest %7B%0A%0A  /**%0A  * Test for %7B@link LockBlockOptions#defaults()%7D.%0A  */%0A  @Test%0A  public void testDefaults() %7B%0A    LockBlockOptions options = LockBlockOptions.defaults();%0A    Assert.assertNotNull(options);%0A  %7D%0A%0A  /**%0A  * Test for %7B@link LockBlockOptions#equals(Object)%7D.%0A  */%0A  @Test%0A  public void testEquals() throws Exception %7B%0A    CommonTestUtils.testEquals(LockBlockOptions.class);%0A  %7D%0A%0A  /**%0A  * Test for %7B@link LockBlockOptions#toThrift()%7D.%0A  */%0A  @Test%0A  public void testToThrift() throws Exception %7B%0A    String ufsPath = %22ufsPath%22;%0A    long blockSize = 1000L;%0A%0A    alluxio.thrift.LockBlockTOptions mockObject =%0A        PowerMockito.mock(alluxio.thrift.LockBlockTOptions.class);%0A    PowerMockito.when(mockObject.getBlockSize()).thenReturn(new Long(1000));%0A    PowerMockito.when(mockObject.getUfsPath()).thenReturn(ufsPath);%0A%0A    LockBlockOptions options = LockBlockOptions.defaults();%0A    options.setUfsPath(ufsPath);%0A    options.setBlockSize(blockSize);%0A%0A    LockBlockTOptions thriftOptions = options.toThrift();%0A    Assert.assertEquals(thriftOptions.getBlockSize(), mockObject.getBlockSize());%0A    Assert.assertEquals(thriftOptions.getUfsPath(), mockObject.getUfsPath());%0A  %7D%0A%7D%0A

Add Unit Tests for the Block package