@@ -249,12 +249,12 @@ public void testCreate_NewKey_Success() throws Exception {
249249 User mockUser = mockUserIndex .getUser ();
250250
251251 when (userService .getUserIndexForId (any (UserIndexKey .class ))).thenReturn (null );
252- when (userService .getOrCreateUserForIndexKey (any (UserIndexKey .class ), eq ("" ), eq (true )))
252+ when (userService .getOrCreateUserForIndexKey (any (UserIndexKey .class ), eq ("test-key-123 " ), eq (false )))
253253 .thenReturn (mockUserIndex );
254254
255255 cli .run (new String []{"create" , "--config" , "/tmp/data-sources.xml" , "--key" , keyValue });
256256
257- verify (userService ).getOrCreateUserForIndexKey (any (UserIndexKey .class ), eq ("" ), eq (true ));
257+ verify (userService ).getOrCreateUserForIndexKey (any (UserIndexKey .class ), eq ("test-key-123 " ), eq (false ));
258258 verify (userPropertiesService ).authorizeApi (eq (mockUser ), anyLong ());
259259 verify (userPropertiesService ).updateApiKeyContactInfo (eq (mockUser ), anyString (), anyString (), anyString (), anyString ());
260260 assertTrue (outContent .toString ().contains ("API key created successfully" ));
@@ -267,7 +267,7 @@ public void testCreate_WithContactInfo_Success() throws Exception {
267267 User mockUser = mockUserIndex .getUser ();
268268
269269 when (userService .getUserIndexForId (any (UserIndexKey .class ))).thenReturn (null );
270- when (userService .getOrCreateUserForIndexKey (any (UserIndexKey .class ), eq ("" ), eq (true )))
270+ when (userService .getOrCreateUserForIndexKey (any (UserIndexKey .class ), eq ("test-key-456 " ), eq (false )))
271271 .thenReturn (mockUserIndex );
272272
273273 cli .run (new String []{
@@ -515,7 +515,7 @@ public void testCreate_JsonOutput_Success() throws Exception {
515515 User mockUser = mockUserIndex .getUser ();
516516
517517 when (userService .getUserIndexForId (any (UserIndexKey .class ))).thenReturn (null );
518- when (userService .getOrCreateUserForIndexKey (any (UserIndexKey .class ), eq ("" ), eq (true )))
518+ when (userService .getOrCreateUserForIndexKey (any (UserIndexKey .class ), eq ("json-test-key " ), eq (false )))
519519 .thenReturn (mockUserIndex );
520520
521521 cli .run (new String []{
0 commit comments