connection.addProperty(connectionProperty);
//List of above created connections
List<Connection> connectionList = new ArrayList<Connection>();
connectionList.add(connection);
//mock the dao
ConnectionDAO mockedConnectionDAO = mock(ConnectionDAO.class);
ConnectionAction connectionAction = new ConnectionAction();
connectionAction.setConnectionDAO(mockedConnectionDAO);
when(mockedConnectionDAO.findAll()).thenReturn(connectionList);
String successString = connectionAction.initializeConnections();
assertEquals(successString, "success");
//Connection's datastore name parameter when not set has value null.