@@ -154,7 +154,6 @@ public void testGetUser() throws Exception {
154154 String id = user .get ("id" ).toString ();
155155 ApiResponse result = account .user (id , null );
156156 assertNotNull (result );
157- deleteUser (id );
158157 }
159158
160159 @ Test
@@ -173,9 +172,6 @@ public void testGetUsers() throws Exception {
173172
174173 assertTrue ("User1 id should be in the result set" , returnedIds .contains (id1 ));
175174 assertTrue ("User2 id should be in the result set" , returnedIds .contains (id2 ));
176- deleteUser (id1 );
177- deleteUser (id2 );
178-
179175 }
180176
181177 @ Test
@@ -193,7 +189,6 @@ public void testUpdateUser() throws Exception {
193189 ApiResponse result = account .updateUser (id , newName , null , null , null , null );
194190 assertNotNull (result );
195191 assertEquals (result .get ("name" ), newName );
196- deleteUser (id );
197192 }
198193
199194 @ Test
@@ -237,7 +232,6 @@ public void testAddUserToUserGroup() throws Exception {
237232 String userId = user .get ("id" ).toString ();
238233 ApiResponse result = account .addUserToGroup (group .get ("id" ).toString (), userId , null );
239234 assertNotNull (result );
240- deleteUser (userId );
241235 }
242236
243237 @ Test
@@ -249,7 +243,6 @@ public void testRemoveUserFromUserGroup() throws Exception {
249243 account .addUserToGroup (groupId , userId , null );
250244 ApiResponse result = account .removeUserFromGroup (groupId , userId , null );
251245 assertNotNull (result );
252- deleteUser (userId );
253246 }
254247
255248 @ Test
@@ -280,8 +273,6 @@ public void testListUsersInGroup() throws Exception {
280273 ApiResponse result = account .userGroupUsers (groupId , null );
281274 assertNotNull (result );
282275 assertTrue (((List ) result .get ("users" )).size () >= 2 );
283- deleteUser (user1Id );
284- deleteUser (user2Id );
285276 }
286277
287278
@@ -325,13 +316,4 @@ private static String randomLetters() {
325316 }
326317 return sb .toString ();
327318 }
328-
329- private void deleteUser (String userId ) {
330- try {
331- account .deleteUser (userId , null );
332- createdUserIds .remove (userId );
333- } catch (Exception e ) {
334- e .printStackTrace ();
335- }
336- }
337319}
0 commit comments