@Test public void testActionValidationRowMapperShouldReturnTrueIfActionIsValidated() throws SQLException { ActionValidationRowMapper actionValidationRowMapper = new ActionValidationRowMapper(); when(resultSet.getBoolean("exists")).thenReturn(true); assert actionValidationRowMapper.mapRow(resultSet, 1).isAllowed(); when(resultSet.getBoolean("exists")).thenReturn(false); assertFalse(actionValidationRowMapper.mapRow(resultSet, 1).isAllowed()); }
@Override public ActionValidation mapRow(ResultSet resultSet, int i) throws SQLException { return ActionValidation.builder().allowed(resultSet.getBoolean("exists")).build(); }
ActionValidationRowMapper implements RowMapper<ActionValidation> { @Override public ActionValidation mapRow(ResultSet resultSet, int i) throws SQLException { return ActionValidation.builder().allowed(resultSet.getBoolean("exists")).build(); } }
ActionValidationRowMapper implements RowMapper<ActionValidation> { @Override public ActionValidation mapRow(ResultSet resultSet, int i) throws SQLException { return ActionValidation.builder().allowed(resultSet.getBoolean("exists")).build(); }  }
ActionValidationRowMapper implements RowMapper<ActionValidation> { @Override public ActionValidation mapRow(ResultSet resultSet, int i) throws SQLException { return ActionValidation.builder().allowed(resultSet.getBoolean("exists")).build(); }  @Override ActionValidation mapRow(ResultSet resultSet, int i); }
ActionValidationRowMapper implements RowMapper<ActionValidation> { @Override public ActionValidation mapRow(ResultSet resultSet, int i) throws SQLException { return ActionValidation.builder().allowed(resultSet.getBoolean("exists")).build(); }  @Override ActionValidation mapRow(ResultSet resultSet, int i);  }