@@ -0,0 +1,991 @@
+package alluxio.client;%0A%0Aimport alluxio.Configuration;%0Aimport alluxio.Constants;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.ExpectedException;%0Aimport org.mockito.Mockito;%0A%0A/**%0A * Tests for the %7B@link RemoteBlockWriter%7D class.%0A */%0Apublic class RemoteBlockWriterTest %7B%0A%0A  @Rule%0A  public ExpectedException mThrown = ExpectedException.none();%0A%0A  @Test%0A  public void createFromMockClass() throws Exception %7B%0A    RemoteBlockWriter mock = Mockito.mock(RemoteBlockWriter.class);%0A    Configuration conf = new Configuration();%0A    conf.set(Constants.USER_BLOCK_REMOTE_WRITER, mock.getClass().getName());%0A    Assert.assertTrue(RemoteBlockWriter.Factory.create(conf).getClass().equals(mock.getClass()));%0A  %7D%0A%0A  @Test%0A  public void createFailed() %7B%0A    mThrown.expect(RuntimeException.class);%0A%0A    Configuration conf = new Configuration();%0A    conf.set(Constants.USER_BLOCK_REMOTE_WRITER, %22unknown%22);%0A    RemoteBlockWriter.Factory.create(conf);%0A  %7D%0A%0A%7D%0A

Test for RemoteBlockWriter.Factory