### Question:
InMemoryConnectionServiceImpl implements IConnectionService { public List<IDatabaseConnection> getConnections() throws ConnectionServiceException { return connectionList; } InMemoryConnectionServiceImpl(); List<IDatabaseConnection> getConnections(); IDatabaseConnection getConnectionByName( String name ); boolean addConnection( IDatabaseConnection connection ); boolean updateConnection( IDatabaseConnection connection ); boolean deleteConnection( IDatabaseConnection connection ); boolean deleteConnection( String name ); boolean testConnection( IDatabaseConnection connection ); boolean isConnectionExist( String connectionName );  }### Answer:
@Test public void testGetConnections() { try { InMemoryConnectionServiceImpl serv = new InMemoryConnectionServiceImpl(); List<IDatabaseConnection> conns = serv.getConnections(); assertTrue( conns != null && conns.size() == 0 ); IDatabaseConnection connection = new DatabaseConnection(); connection.setName( "Connection 1" ); serv.addConnection( connection ); conns = serv.getConnections(); assertTrue( conns != null && conns.size() > 0 ); } catch ( Exception ex ) { fail(); } }