package com.emc.ecs.managementClient;

import static org.junit.Assert.*;

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

import com.emc.ecs.serviceBroker.EcsManagementClientException;
import com.emc.ecs.serviceBroker.model.UserSecretKey;

public class ObjectUserSecretActionTest extends EcsActionTest {
	private String user = "testuser2";
	
	@Before
	public void setUp() throws EcsManagementClientException {
		connection.login();
		ObjectUserAction.create(connection, user, namespace);			
	}
	
	@After
	public void cleanup() throws EcsManagementClientException {
		ObjectUserAction.delete(connection, user);
		connection.logout();
	}
	
	@Test
	public void createUserSecretKey() throws EcsManagementClientException {
		UserSecretKey secret = ObjectUserSecretAction.create(connection, user);
		assertNotNull(secret.getSecretKey());
	}
}

@@ -67,16 +67,40 @@
 ert.*;%0A%0A
+import java.util.List;%0A%0A
 import o
@@ -877,10 +877,322 @@
 ());%0A%09%7D%0A
+%09%0A%09@Test%0A%09public void listUserSecretKey() throws EcsManagementClientException %7B%0A%09%09UserSecretKey secret = ObjectUserSecretAction.create(connection, user);%0A%09%09List%3CUserSecretKey%3E secretKeys = ObjectUserSecretAction.list(connection, user);%0A%09%09assertEquals(secret.getSecretKey(), secretKeys.get(0).getSecretKey());%0A%09%7D%0A
 %7D%0A

Add secret key list unit test