@@ -0,0 +1,1330 @@
+package org.sagebionetworks.lib.dbuserhelper;%0A%0Aimport org.junit.jupiter.api.Test;%0Aimport org.junit.jupiter.api.extension.ExtendWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.junit.jupiter.MockitoExtension;%0Aimport org.sagebionetworks.StackConfiguration;%0Aimport org.springframework.jdbc.core.JdbcTemplate;%0Aimport org.springframework.test.context.ContextConfiguration;%0Aimport org.springframework.test.context.junit.jupiter.SpringExtension;%0A%0Aimport static org.junit.jupiter.api.Assertions.*;%0Aimport static org.mockito.ArgumentMatchers.anyString;%0Aimport static org.mockito.Mockito.times;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.when;%0A%0A@ExtendWith(MockitoExtension.class)%0Aclass DBUserHelperTest %7B%0A%0A%09@Mock%0A%09StackConfiguration mockConfig;%0A%09@Mock%0A%09JdbcTemplate mockTemplate;%0A%0A%09@Test%0A%09void createReadOnlyUser() %7B%0A%09%09when(mockConfig.getDbReadOnlyUserName()).thenReturn(%22userName%22);%0A%09%09when(mockConfig.getDbReadOnlyPassword()).thenReturn(%22userPassword%22);%0A%09%09when(mockTemplate.update(anyString())).thenReturn(1, 1);%0A%09%09DBUserHelper dbUserHelper = new DBUserHelper(mockConfig);%0A%09%09dbUserHelper.createDbReadOnlyUser(mockTemplate);%0A%09%09verify(mockTemplate).update(%22CREATE USER IF NOT EXISTS 'userName'@'%25' IDENTIFIED BY 'userPassword'%22);%0A%09%09verify(mockTemplate).update(%22GRANT SELECT ON *.* TO 'userName'@'%25'%22);%0A%09%7D%0A%7D

Add test