@Test void upgradeException() { DataAccessException dataAccessException = mock(DataAccessException.class); doThrow(dataAccessException).when(jdbcTemplate).execute(any(String.class)); assertThrows(DataAccessException.class, () -> step40AddRoleSystem.upgrade()); }
@Override public void upgrade() { LOG.debug("Adding ROLE_SYSTEM to ROLE_SU..."); addRoleSystem(); LOG.info("Added ROLE_SYSTEM to ROLE_SU"); }
Step40AddRoleSystem extends MolgenisUpgrade { @Override public void upgrade() { LOG.debug("Adding ROLE_SYSTEM to ROLE_SU..."); addRoleSystem(); LOG.info("Added ROLE_SYSTEM to ROLE_SU"); } }
Step40AddRoleSystem extends MolgenisUpgrade { @Override public void upgrade() { LOG.debug("Adding ROLE_SYSTEM to ROLE_SU..."); addRoleSystem(); LOG.info("Added ROLE_SYSTEM to ROLE_SU"); } Step40AddRoleSystem(DataSource dataSource);   Step40AddRoleSystem(JdbcTemplate jdbcTemplate); }
Step40AddRoleSystem extends MolgenisUpgrade { @Override public void upgrade() { LOG.debug("Adding ROLE_SYSTEM to ROLE_SU..."); addRoleSystem(); LOG.info("Added ROLE_SYSTEM to ROLE_SU"); } Step40AddRoleSystem(DataSource dataSource);   Step40AddRoleSystem(JdbcTemplate jdbcTemplate); @Override void upgrade(); }
Step40AddRoleSystem extends MolgenisUpgrade { @Override public void upgrade() { LOG.debug("Adding ROLE_SYSTEM to ROLE_SU..."); addRoleSystem(); LOG.info("Added ROLE_SYSTEM to ROLE_SU"); } Step40AddRoleSystem(DataSource dataSource);   Step40AddRoleSystem(JdbcTemplate jdbcTemplate); @Override void upgrade();  }