### Question:
LoginSecurityConverter implements Converter { @VisibleForTesting void performConversion(CommandSender sender, Connection connection) throws SQLException { try (Statement statement = connection.createStatement()) { statement.execute( "SELECT * from ls_players LEFT JOIN ls_locations ON ls_locations.id = ls_players.id"); try (ResultSet resultSet = statement.getResultSet()) { migrateData(sender, resultSet); } } } @Inject  LoginSecurityConverter(@DataFolder File dataFolder, DataSource dataSource, Settings settings); @Override void execute(CommandSender sender);  }### Answer:
@Test public void shouldConvertFromMySql() throws IOException, SQLException { Connection connection = initializeMySqlTable(); CommandSender sender = mock(CommandSender.class); converter.performConversion(sender, connection); ArgumentCaptor<PlayerAuth> captor = ArgumentCaptor.forClass(PlayerAuth.class); verify(dataSource, times(3)).saveAuth(captor.capture()); assertThat(captor.getAllValues().get(0).getNickname(), equalTo("player1")); assertThat(captor.getAllValues().get(0).getRealName(), equalTo("Player1")); assertThat(captor.getAllValues().get(0).getLastLogin(), equalTo(1494242093000L)); assertThat(captor.getAllValues().get(0).getPassword(), equalToHash("$2a$10$E1Ri7XKeIIBv4qVaiPplgepT7QH9xGFh3hbHfcmCjq7hiW.UBTiGK")); assertThat(captor.getAllValues().get(0).getLastIp(), nullValue()); assertIsCloseTo(captor.getAllValues().get(0).getRegistrationDate(), 1494201600000L, 12 * 60 * 60 * 1000); assertThat(captor.getAllValues().get(1).getNickname(), equalTo("player2")); assertThat(captor.getAllValues().get(1).getLastLogin(), equalTo(1489317753000L)); assertThat(captor.getAllValues().get(1).getLastIp(), equalTo("127.4.5.6")); assertThat(captor.getAllValues().get(2).getRealName(), equalTo("Player3")); assertThat(captor.getAllValues().get(2).getPassword(), equalToHash("$2a$10$WFui8KSXMLDOVXKFpCLyPukPi4M82w1cv/rNojsAnwJjba3pp8sba")); assertThat(captor.getAllValues().get(2), hasAuthLocation(14.24, 67.99, -12.83, "hubb", -10f, 185f)); }