@Test
public void testAction() throws Exception {

  ExecutionCommand executionCommand = new ExecutionCommand();
  Map<String, String> commandParams = new HashMap<>();
  HostRoleCommand hrc = EasyMock.createMock(HostRoleCommand.class);
  SparkShufflePropertyConfig action = new SparkShufflePropertyConfig();
  commandParams.put("clusterName", "c1");
  executionCommand.setCommandParams(commandParams);
  executionCommand.setClusterName("c1");
  expect(hrc.getRequestId()).andReturn(1L).anyTimes();
  expect(hrc.getStageId()).andReturn(2L).anyTimes();
  expect(hrc.getExecutionCommandWrapper()).andReturn(new ExecutionCommandWrapper(executionCommand)).anyTimes();
  replay(cluster, hrc);
  clusterField.set(action, m_clusters);
  action.setExecutionCommand(executionCommand);
  action.setHostRoleCommand(hrc);
  CommandReport report = action.execute(null);
  assertNotNull(report);
  Cluster c = m_clusters.getCluster("c1");
  Config config = c.getDesiredConfigByType("yarn-site");
  Map<String, String> map = config.getProperties();
  assertTrue(map.containsKey("yarn.nodemanager.aux-services"));
  assertTrue(map.containsKey("yarn.nodemanager.aux-services.spark_shuffle.class"));
  assertEquals("some_service,spark_shuffle", map.get("yarn.nodemanager.aux-services"));
  assertEquals("org.apache.spark.network.yarn.YarnShuffleService", map.get("yarn.nodemanager.aux-services.spark_shuffle.class"));
}