@Test public void loadOnNonexistentFile() throws IOException { final Path randomFile = Files.createTempFile("other", ".txt").getParent().resolve("unknown"); final Throwable throwable = catchThrowable(() -> loader.load(randomFile)); assertThat(throwable) .isNotNull() .isInstanceOf(SQLiteException.class) .hasMessageContaining("[SQLITE_ERROR] SQL error or missing database (no such table: payload)"); }
@Override public void load(final Path input) throws SQLException { final String url = "jdbc:sqlite:" + input.toString(); this.connection = DriverManager.getConnection(url); this.statement = this.connection.createStatement(); this.results = this.statement.executeQuery(SELECT_QUERY); }
SqliteLoader implements StoreLoader { @Override public void load(final Path input) throws SQLException { final String url = "jdbc:sqlite:" + input.toString(); this.connection = DriverManager.getConnection(url); this.statement = this.connection.createStatement(); this.results = this.statement.executeQuery(SELECT_QUERY); } }
SqliteLoader implements StoreLoader { @Override public void load(final Path input) throws SQLException { final String url = "jdbc:sqlite:" + input.toString(); this.connection = DriverManager.getConnection(url); this.statement = this.connection.createStatement(); this.results = this.statement.executeQuery(SELECT_QUERY); }  }
SqliteLoader implements StoreLoader { @Override public void load(final Path input) throws SQLException { final String url = "jdbc:sqlite:" + input.toString(); this.connection = DriverManager.getConnection(url); this.statement = this.connection.createStatement(); this.results = this.statement.executeQuery(SELECT_QUERY); }  @Override void load(final Path input); @Override DataEntry nextEntry(); }
SqliteLoader implements StoreLoader { @Override public void load(final Path input) throws SQLException { final String url = "jdbc:sqlite:" + input.toString(); this.connection = DriverManager.getConnection(url); this.statement = this.connection.createStatement(); this.results = this.statement.executeQuery(SELECT_QUERY); }  @Override void load(final Path input); @Override DataEntry nextEntry();  }