package com.emc.ecs.managementClient;

import static org.junit.Assert.assertTrue;

import java.util.List;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.emc.ecs.common.EcsActionTest;
import com.emc.ecs.managementClient.model.DataServiceReplicationGroup;
import com.emc.ecs.serviceBroker.EcsManagementClientException;
import com.emc.ecs.serviceBroker.EcsManagementResourceNotFoundException;

public class ReplicationGroupActionTest extends EcsActionTest {
	private String replicationGroup = "rg1";

	@Before
	public void setUp() throws EcsManagementClientException {
		connection.login();
	}

	@After
	public void cleanup() throws EcsManagementClientException {
		connection.logout();
	}

	@Test
	public void listReplicationGroups() throws EcsManagementClientException {
		List<DataServiceReplicationGroup> rgList = ReplicationGroupAction
				.list(connection);
		assertTrue(rgList.size() == 1);
	}

	@Test
	public void getReplicationGroup() throws EcsManagementClientException,
			EcsManagementResourceNotFoundException {
		DataServiceReplicationGroup rg = ReplicationGroupAction.get(connection,
				replicationGroup);
		assertTrue(rg.getName().equals(replicationGroup));
	}

}
@@ -489,50 +489,8 @@
 st %7B
-%0A%09private String replicationGroup = %22rg1%22;
 %0A%0A%09@
@@ -1088,81 +1088,245 @@
 ion,
-%0A%09%09%09%09replicationGroup);%0A%09%09assertTrue(rg.getName().equals(replicationGroup
+ %22urn:storageos:ReplicationGroupInfo:2ef0a92d-cf88-4933-90ba-90245aa031b1:global%22);%0A%09%09assertTrue(rg.getName().equals(%22rg1%22));%0A%09%09assertTrue(rg.getId().equals(%22urn:storageos:ReplicationGroupInfo:2ef0a92d-cf88-4933-90ba-90245aa031b1:global%22
 ));%0A

Improve RG unit test