@@ -0,0 +1,1619 @@
+/*%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.cli;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport alluxio.PropertyKey;%0Aimport alluxio.SystemOutRule;%0A%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0A%0Aimport java.io.ByteArrayOutputStream;%0A%0A/**%0A * Tests for %7B@link GetConfKey%7D.%0A */%0Apublic final class GetConfKeyTest %7B%0A  private ByteArrayOutputStream mOutputStream = new ByteArrayOutputStream();%0A%0A  @Rule%0A  public SystemOutRule mOutputStreamRule = new SystemOutRule(mOutputStream);%0A%0A  @Test%0A  public void getConfKey() throws Exception %7B%0A    String varName = PropertyKey.WORKER_MEMORY_SIZE.getName().toUpperCase().replace(%22.%22, %22_%22);%0A    assertEquals(0, GetConfKey.getConfKey(varName));%0A    assertEquals(String.format(%22%25s%5Cn%22, PropertyKey.WORKER_MEMORY_SIZE.getName()),%0A        mOutputStream.toString());%0A%0A    mOutputStream.reset();%0A    varName = %22AWS_ACCESSKEYID%22;%0A    assertEquals(0, GetConfKey.getConfKey(varName));%0A    assertEquals(String.format(%22%25s%5Cn%22, PropertyKey.S3A_ACCESS_KEY.getName()),%0A        mOutputStream.toString());%0A%0A    mOutputStream.reset();%0A    assertEquals(1, GetConfKey.getConfKey(%22ALLUXIO_INVALID_COMMAND%22));%0A  %7D%0A%7D%0A

Add unit test