1 package org.onap.appc.adapter.netconf.internal;
3 import org.junit.Assert;
4 import org.junit.Before;
6 import org.onap.appc.adapter.netconf.ConnectionDetails;
7 import org.onap.appc.adapter.netconf.NetconfConnectionDetails;
8 import org.onap.ccsdk.sli.core.dblib.DbLibService;
10 import javax.sql.RowSet;
11 import javax.sql.RowSetEvent;
12 import javax.sql.RowSetListener;
13 import javax.sql.RowSetMetaData;
14 import javax.sql.rowset.CachedRowSet;
15 import javax.sql.rowset.RowSetWarning;
16 import javax.sql.rowset.spi.SyncProvider;
17 import javax.sql.rowset.spi.SyncProviderException;
18 import java.io.IOException;
19 import java.io.InputStream;
20 import java.io.PrintWriter;
21 import java.io.Reader;
22 import java.math.BigDecimal;
24 import java.sql.Array;
27 import java.sql.Connection;
29 import java.sql.NClob;
31 import java.sql.ResultSet;
32 import java.sql.ResultSetMetaData;
33 import java.sql.RowId;
34 import java.sql.SQLException;
35 import java.sql.SQLFeatureNotSupportedException;
36 import java.sql.SQLWarning;
37 import java.sql.SQLXML;
38 import java.sql.Savepoint;
39 import java.sql.Statement;
41 import java.sql.Timestamp;
42 import java.util.ArrayList;
43 import java.util.Calendar;
44 import java.util.Collection;
46 import java.util.logging.Logger;
48 public class TestNetconfDataAccessServiceImpl {
49 private String schema;
50 private DbLibService dbLibServiceMocked;
51 NetconfDataAccessServiceImpl netconfDataAccessService;
55 schema = "test-netconf-adaptor";
56 dbLibServiceMocked = new DbLibService() {
58 public CachedRowSet getData(String s, ArrayList<String> arrayList, String s1) throws SQLException {
59 CachedRowSet cachedRowSetMocked = new CachedRowSet() {
61 public void populate(ResultSet data) throws SQLException {
66 public void execute(Connection conn) throws SQLException {
71 public void acceptChanges() throws SyncProviderException {
76 public void acceptChanges(Connection con) throws SyncProviderException {
81 public void restoreOriginal() throws SQLException {
86 public void release() throws SQLException {
91 public void undoDelete() throws SQLException {
96 public void undoInsert() throws SQLException {
101 public void undoUpdate() throws SQLException {
106 public boolean columnUpdated(int idx) throws SQLException {
111 public boolean columnUpdated(String columnName) throws SQLException {
116 public Collection<?> toCollection() throws SQLException {
121 public Collection<?> toCollection(int column) throws SQLException {
126 public Collection<?> toCollection(String column) throws SQLException {
131 public SyncProvider getSyncProvider() throws SQLException {
136 public void setSyncProvider(String provider) throws SQLException {
146 public void setMetaData(RowSetMetaData md) throws SQLException {
151 public ResultSet getOriginal() throws SQLException {
156 public ResultSet getOriginalRow() throws SQLException {
161 public void setOriginalRow() throws SQLException {
166 public String getTableName() throws SQLException {
171 public void setTableName(String tabName) throws SQLException {
176 public int[] getKeyColumns() throws SQLException {
181 public void setKeyColumns(int[] keys) throws SQLException {
186 public RowSet createShared() throws SQLException {
191 public CachedRowSet createCopy() throws SQLException {
196 public CachedRowSet createCopySchema() throws SQLException {
201 public CachedRowSet createCopyNoConstraints() throws SQLException {
206 public RowSetWarning getRowSetWarnings() throws SQLException {
211 public boolean getShowDeleted() throws SQLException {
216 public void setShowDeleted(boolean b) throws SQLException {
221 public void commit() throws SQLException {
226 public void rollback() throws SQLException {
231 public void rollback(Savepoint s) throws SQLException {
236 public void rowSetPopulated(RowSetEvent event, int numRows) throws SQLException {
241 public void populate(ResultSet rs, int startRow) throws SQLException {
246 public void setPageSize(int size) throws SQLException {
251 public int getPageSize() {
256 public boolean nextPage() throws SQLException {
261 public boolean previousPage() throws SQLException {
266 public String getUrl() throws SQLException {
271 public void setUrl(String url) throws SQLException {
276 public String getDataSourceName() {
281 public void setDataSourceName(String name) throws SQLException {
286 public String getUsername() {
291 public void setUsername(String name) throws SQLException {
296 public String getPassword() {
301 public void setPassword(String password) throws SQLException {
306 public int getTransactionIsolation() {
311 public void setTransactionIsolation(int level) throws SQLException {
316 public Map<String, Class<?>> getTypeMap() throws SQLException {
321 public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
326 public String getCommand() {
331 public void setCommand(String cmd) throws SQLException {
336 public boolean isReadOnly() {
341 public void setReadOnly(boolean value) throws SQLException {
346 public int getMaxFieldSize() throws SQLException {
351 public void setMaxFieldSize(int max) throws SQLException {
356 public int getMaxRows() throws SQLException {
361 public void setMaxRows(int max) throws SQLException {
366 public boolean getEscapeProcessing() throws SQLException {
371 public void setEscapeProcessing(boolean enable) throws SQLException {
376 public int getQueryTimeout() throws SQLException {
381 public void setQueryTimeout(int seconds) throws SQLException {
386 public void setType(int type) throws SQLException {
391 public void setConcurrency(int concurrency) throws SQLException {
396 public void setNull(int parameterIndex, int sqlType) throws SQLException {
401 public void setNull(String parameterName, int sqlType) throws SQLException {
406 public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException {
411 public void setNull(String parameterName, int sqlType, String typeName) throws SQLException {
416 public void setBoolean(int parameterIndex, boolean x) throws SQLException {
421 public void setBoolean(String parameterName, boolean x) throws SQLException {
426 public void setByte(int parameterIndex, byte x) throws SQLException {
431 public void setByte(String parameterName, byte x) throws SQLException {
436 public void setShort(int parameterIndex, short x) throws SQLException {
441 public void setShort(String parameterName, short x) throws SQLException {
446 public void setInt(int parameterIndex, int x) throws SQLException {
451 public void setInt(String parameterName, int x) throws SQLException {
456 public void setLong(int parameterIndex, long x) throws SQLException {
461 public void setLong(String parameterName, long x) throws SQLException {
466 public void setFloat(int parameterIndex, float x) throws SQLException {
471 public void setFloat(String parameterName, float x) throws SQLException {
476 public void setDouble(int parameterIndex, double x) throws SQLException {
481 public void setDouble(String parameterName, double x) throws SQLException {
486 public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException {
491 public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException {
496 public void setString(int parameterIndex, String x) throws SQLException {
501 public void setString(String parameterName, String x) throws SQLException {
506 public void setBytes(int parameterIndex, byte[] x) throws SQLException {
511 public void setBytes(String parameterName, byte[] x) throws SQLException {
516 public void setDate(int parameterIndex, Date x) throws SQLException {
521 public void setTime(int parameterIndex, Time x) throws SQLException {
526 public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
531 public void setTimestamp(String parameterName, Timestamp x) throws SQLException {
536 public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException {
541 public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException {
546 public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException {
551 public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException {
556 public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException {
561 public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException {
566 public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException {
571 public void setAsciiStream(String parameterName, InputStream x) throws SQLException {
576 public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException {
581 public void setBinaryStream(String parameterName, InputStream x) throws SQLException {
586 public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException {
591 public void setCharacterStream(String parameterName, Reader reader) throws SQLException {
596 public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {
601 public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException {
606 public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException {
611 public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException {
616 public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException {
621 public void setObject(String parameterName, Object x) throws SQLException {
626 public void setObject(int parameterIndex, Object x) throws SQLException {
631 public void setRef(int i, Ref x) throws SQLException {
636 public void setBlob(int i, Blob x) throws SQLException {
641 public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException {
646 public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException {
651 public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException {
656 public void setBlob(String parameterName, Blob x) throws SQLException {
661 public void setBlob(String parameterName, InputStream inputStream) throws SQLException {
666 public void setClob(int i, Clob x) throws SQLException {
671 public void setClob(int parameterIndex, Reader reader, long length) throws SQLException {
676 public void setClob(int parameterIndex, Reader reader) throws SQLException {
681 public void setClob(String parameterName, Reader reader, long length) throws SQLException {
686 public void setClob(String parameterName, Clob x) throws SQLException {
691 public void setClob(String parameterName, Reader reader) throws SQLException {
696 public void setArray(int i, Array x) throws SQLException {
701 public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException {
706 public void setDate(String parameterName, Date x) throws SQLException {
711 public void setDate(String parameterName, Date x, Calendar cal) throws SQLException {
716 public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {
721 public void setTime(String parameterName, Time x) throws SQLException {
726 public void setTime(String parameterName, Time x, Calendar cal) throws SQLException {
731 public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException {
736 public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException {
741 public void clearParameters() throws SQLException {
746 public void execute() throws SQLException {
751 public void addRowSetListener(RowSetListener listener) {
756 public void removeRowSetListener(RowSetListener listener) {
761 public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
766 public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException {
771 public void setRowId(int parameterIndex, RowId x) throws SQLException {
776 public void setRowId(String parameterName, RowId x) throws SQLException {
781 public void setNString(int parameterIndex, String value) throws SQLException {
786 public void setNString(String parameterName, String value) throws SQLException {
791 public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException {
796 public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException {
801 public void setNCharacterStream(String parameterName, Reader value) throws SQLException {
806 public void setNClob(String parameterName, NClob value) throws SQLException {
811 public void setNClob(String parameterName, Reader reader, long length) throws SQLException {
816 public void setNClob(String parameterName, Reader reader) throws SQLException {
821 public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException {
826 public void setNClob(int parameterIndex, NClob value) throws SQLException {
831 public void setNClob(int parameterIndex, Reader reader) throws SQLException {
836 public void setURL(int parameterIndex, URL x) throws SQLException {
841 public boolean next() throws SQLException {
846 public void close() throws SQLException {
851 public boolean wasNull() throws SQLException {
856 public String getString(int columnIndex) throws SQLException {
861 public boolean getBoolean(int columnIndex) throws SQLException {
866 public byte getByte(int columnIndex) throws SQLException {
871 public short getShort(int columnIndex) throws SQLException {
876 public int getInt(int columnIndex) throws SQLException {
881 public long getLong(int columnIndex) throws SQLException {
886 public float getFloat(int columnIndex) throws SQLException {
891 public double getDouble(int columnIndex) throws SQLException {
896 public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
901 public byte[] getBytes(int columnIndex) throws SQLException {
906 public Date getDate(int columnIndex) throws SQLException {
911 public Time getTime(int columnIndex) throws SQLException {
916 public Timestamp getTimestamp(int columnIndex) throws SQLException {
921 public InputStream getAsciiStream(int columnIndex) throws SQLException {
926 public InputStream getUnicodeStream(int columnIndex) throws SQLException {
931 public InputStream getBinaryStream(int columnIndex) throws SQLException {
936 public String getString(String columnLabel) throws SQLException {
941 public boolean getBoolean(String columnLabel) throws SQLException {
946 public byte getByte(String columnLabel) throws SQLException {
951 public short getShort(String columnLabel) throws SQLException {
956 public int getInt(String columnLabel) throws SQLException {
961 public long getLong(String columnLabel) throws SQLException {
966 public float getFloat(String columnLabel) throws SQLException {
971 public double getDouble(String columnLabel) throws SQLException {
976 public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException {
981 public byte[] getBytes(String columnLabel) throws SQLException {
986 public Date getDate(String columnLabel) throws SQLException {
991 public Time getTime(String columnLabel) throws SQLException {
996 public Timestamp getTimestamp(String columnLabel) throws SQLException {
1001 public InputStream getAsciiStream(String columnLabel) throws SQLException {
1006 public InputStream getUnicodeStream(String columnLabel) throws SQLException {
1011 public InputStream getBinaryStream(String columnLabel) throws SQLException {
1016 public SQLWarning getWarnings() throws SQLException {
1021 public void clearWarnings() throws SQLException {
1026 public String getCursorName() throws SQLException {
1031 public ResultSetMetaData getMetaData() throws SQLException {
1036 public Object getObject(int columnIndex) throws SQLException {
1041 public Object getObject(String columnLabel) throws SQLException {
1046 public int findColumn(String columnLabel) throws SQLException {
1051 public Reader getCharacterStream(int columnIndex) throws SQLException {
1056 public Reader getCharacterStream(String columnLabel) throws SQLException {
1061 public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
1066 public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
1071 public boolean isBeforeFirst() throws SQLException {
1076 public boolean isAfterLast() throws SQLException {
1081 public boolean isFirst() throws SQLException {
1086 public boolean isLast() throws SQLException {
1091 public void beforeFirst() throws SQLException {
1096 public void afterLast() throws SQLException {
1101 public boolean first() throws SQLException {
1106 public boolean last() throws SQLException {
1111 public int getRow() throws SQLException {
1116 public boolean absolute(int row) throws SQLException {
1121 public boolean relative(int rows) throws SQLException {
1126 public boolean previous() throws SQLException {
1131 public void setFetchDirection(int direction) throws SQLException {
1136 public int getFetchDirection() throws SQLException {
1141 public void setFetchSize(int rows) throws SQLException {
1146 public int getFetchSize() throws SQLException {
1151 public int getType() throws SQLException {
1156 public int getConcurrency() throws SQLException {
1161 public boolean rowUpdated() throws SQLException {
1166 public boolean rowInserted() throws SQLException {
1171 public boolean rowDeleted() throws SQLException {
1176 public void updateNull(int columnIndex) throws SQLException {
1181 public void updateBoolean(int columnIndex, boolean x) throws SQLException {
1186 public void updateByte(int columnIndex, byte x) throws SQLException {
1191 public void updateShort(int columnIndex, short x) throws SQLException {
1196 public void updateInt(int columnIndex, int x) throws SQLException {
1201 public void updateLong(int columnIndex, long x) throws SQLException {
1206 public void updateFloat(int columnIndex, float x) throws SQLException {
1211 public void updateDouble(int columnIndex, double x) throws SQLException {
1216 public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {
1221 public void updateString(int columnIndex, String x) throws SQLException {
1226 public void updateBytes(int columnIndex, byte[] x) throws SQLException {
1231 public void updateDate(int columnIndex, Date x) throws SQLException {
1236 public void updateTime(int columnIndex, Time x) throws SQLException {
1241 public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException {
1246 public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException {
1251 public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException {
1256 public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException {
1261 public void updateObject(int columnIndex, Object x, int scaleOrLength) throws SQLException {
1266 public void updateObject(int columnIndex, Object x) throws SQLException {
1271 public void updateNull(String columnLabel) throws SQLException {
1276 public void updateBoolean(String columnLabel, boolean x) throws SQLException {
1281 public void updateByte(String columnLabel, byte x) throws SQLException {
1286 public void updateShort(String columnLabel, short x) throws SQLException {
1291 public void updateInt(String columnLabel, int x) throws SQLException {
1296 public void updateLong(String columnLabel, long x) throws SQLException {
1301 public void updateFloat(String columnLabel, float x) throws SQLException {
1306 public void updateDouble(String columnLabel, double x) throws SQLException {
1311 public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException {
1316 public void updateString(String columnLabel, String x) throws SQLException {
1321 public void updateBytes(String columnLabel, byte[] x) throws SQLException {
1326 public void updateDate(String columnLabel, Date x) throws SQLException {
1331 public void updateTime(String columnLabel, Time x) throws SQLException {
1336 public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException {
1341 public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException {
1346 public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException {
1351 public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException {
1356 public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException {
1361 public void updateObject(String columnLabel, Object x) throws SQLException {
1366 public void insertRow() throws SQLException {
1371 public void updateRow() throws SQLException {
1376 public void deleteRow() throws SQLException {
1381 public void refreshRow() throws SQLException {
1386 public void cancelRowUpdates() throws SQLException {
1391 public void moveToInsertRow() throws SQLException {
1396 public void moveToCurrentRow() throws SQLException {
1401 public Statement getStatement() throws SQLException {
1406 public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException {
1411 public Ref getRef(int columnIndex) throws SQLException {
1416 public Blob getBlob(int columnIndex) throws SQLException {
1421 public Clob getClob(int columnIndex) throws SQLException {
1426 public Array getArray(int columnIndex) throws SQLException {
1431 public Object getObject(String columnLabel, Map<String, Class<?>> map) throws SQLException {
1436 public Ref getRef(String columnLabel) throws SQLException {
1441 public Blob getBlob(String columnLabel) throws SQLException {
1446 public Clob getClob(String columnLabel) throws SQLException {
1451 public Array getArray(String columnLabel) throws SQLException {
1456 public Date getDate(int columnIndex, Calendar cal) throws SQLException {
1461 public Date getDate(String columnLabel, Calendar cal) throws SQLException {
1466 public Time getTime(int columnIndex, Calendar cal) throws SQLException {
1471 public Time getTime(String columnLabel, Calendar cal) throws SQLException {
1476 public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
1481 public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException {
1486 public URL getURL(int columnIndex) throws SQLException {
1491 public URL getURL(String columnLabel) throws SQLException {
1496 public void updateRef(int columnIndex, Ref x) throws SQLException {
1501 public void updateRef(String columnLabel, Ref x) throws SQLException {
1506 public void updateBlob(int columnIndex, Blob x) throws SQLException {
1511 public void updateBlob(String columnLabel, Blob x) throws SQLException {
1516 public void updateClob(int columnIndex, Clob x) throws SQLException {
1521 public void updateClob(String columnLabel, Clob x) throws SQLException {
1526 public void updateArray(int columnIndex, Array x) throws SQLException {
1531 public void updateArray(String columnLabel, Array x) throws SQLException {
1536 public RowId getRowId(int columnIndex) throws SQLException {
1541 public RowId getRowId(String columnLabel) throws SQLException {
1546 public void updateRowId(int columnIndex, RowId x) throws SQLException {
1551 public void updateRowId(String columnLabel, RowId x) throws SQLException {
1556 public int getHoldability() throws SQLException {
1561 public boolean isClosed() throws SQLException {
1566 public void updateNString(int columnIndex, String nString) throws SQLException {
1571 public void updateNString(String columnLabel, String nString) throws SQLException {
1576 public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
1581 public void updateNClob(String columnLabel, NClob nClob) throws SQLException {
1586 public NClob getNClob(int columnIndex) throws SQLException {
1591 public NClob getNClob(String columnLabel) throws SQLException {
1596 public SQLXML getSQLXML(int columnIndex) throws SQLException {
1601 public SQLXML getSQLXML(String columnLabel) throws SQLException {
1606 public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException {
1611 public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException {
1616 public String getNString(int columnIndex) throws SQLException {
1621 public String getNString(String columnLabel) throws SQLException {
1626 public Reader getNCharacterStream(int columnIndex) throws SQLException {
1631 public Reader getNCharacterStream(String columnLabel) throws SQLException {
1636 public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
1641 public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
1646 public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException {
1651 public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException {
1656 public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
1661 public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException {
1666 public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException {
1671 public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
1676 public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException {
1681 public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {
1686 public void updateClob(int columnIndex, Reader reader, long length) throws SQLException {
1691 public void updateClob(String columnLabel, Reader reader, long length) throws SQLException {
1696 public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException {
1701 public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException {
1706 public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException {
1711 public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException {
1716 public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException {
1721 public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException {
1726 public void updateCharacterStream(int columnIndex, Reader x) throws SQLException {
1731 public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException {
1736 public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException {
1741 public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException {
1746 public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {
1751 public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException {
1756 public void updateClob(int columnIndex, Reader reader) throws SQLException {
1761 public void updateClob(String columnLabel, Reader reader) throws SQLException {
1766 public void updateNClob(int columnIndex, Reader reader) throws SQLException {
1771 public void updateNClob(String columnLabel, Reader reader) throws SQLException {
1776 public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
1781 public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
1786 public <T> T unwrap(Class<T> iface) throws SQLException {
1791 public boolean isWrapperFor(Class<?> iface) throws SQLException {
1796 public void setMatchColumn(int columnIdx) throws SQLException {
1801 public void setMatchColumn(int[] columnIdxes) throws SQLException {
1806 public void setMatchColumn(String columnName) throws SQLException {
1811 public void setMatchColumn(String[] columnNames) throws SQLException {
1816 public int[] getMatchColumnIndexes() throws SQLException {
1821 public String[] getMatchColumnNames() throws SQLException {
1822 return new String[0];
1826 public void unsetMatchColumn(int columnIdx) throws SQLException {
1831 public void unsetMatchColumn(int[] columnIdxes) throws SQLException {
1836 public void unsetMatchColumn(String columnName) throws SQLException {
1841 public void unsetMatchColumn(String[] columnName) throws SQLException {
1845 return cachedRowSetMocked;
1849 public boolean writeData(String s, ArrayList<String> arrayList, String s1) throws SQLException {
1854 public boolean isActive() {
1859 public Connection getConnection() throws SQLException {
1864 public Connection getConnection(String username, String password) throws SQLException {
1869 public <T> T unwrap(Class<T> iface) throws SQLException {
1874 public boolean isWrapperFor(Class<?> iface) throws SQLException {
1879 public PrintWriter getLogWriter() throws SQLException {
1884 public void setLogWriter(PrintWriter out) throws SQLException {
1889 public void setLoginTimeout(int seconds) throws SQLException {
1894 public int getLoginTimeout() throws SQLException {
1899 public Logger getParentLogger() throws SQLFeatureNotSupportedException {
1904 netconfDataAccessService = new NetconfDataAccessServiceImpl();
1905 netconfDataAccessService.setSchema(schema);
1906 netconfDataAccessService.setDbLibService(dbLibServiceMocked);
1910 public void testRetrieveConfigFileName() throws IOException {
1911 String response = netconfDataAccessService.retrieveConfigFileName("test");
1913 Assert.assertEquals("", response);
1917 public void testRetrieveConnectionDetails() throws IOException {
1918 ConnectionDetails netconfConnectionDetails = new ConnectionDetails();
1920 boolean response = netconfDataAccessService.retrieveConnectionDetails("test", netconfConnectionDetails);
1922 Assert.assertEquals(false, response);
1926 public void testRetrieveNetconfConnectionDetails() throws IOException {
1927 NetconfConnectionDetails netconfConnectionDetails = new NetconfConnectionDetails();
1929 boolean response = netconfDataAccessService.retrieveNetconfConnectionDetails("test", netconfConnectionDetails);
1931 Assert.assertEquals(true, response);
1935 public void testLogDeviceInteraction() throws IOException {
1936 NetconfConnectionDetails netconfConnectionDetails = new NetconfConnectionDetails();
1938 boolean response = netconfDataAccessService.logDeviceInteraction("test", "",
1941 Assert.assertEquals(true, response);