RegistrationsRepository { public void removeRegistration(String registrationId) throws RegistrationPersistenceException { try { jdbcTemplate.update("delete from t_registrations where id=?", registrationId); } catch (DataAccessException e) { throw new RegistrationPersistenceException(e); } }  void saveRegistration(Registration registration); void updateRegistration(Registration registration); Map<String, Registration> getAllRegistrations(); Registration getRegistration(String registrationId); void removeRegistration(String registrationId);  }
@Test public void removeRegistrationTest() throws URISyntaxException, RegistrationPersistenceException { RegisterContext registerContext = createRegisterContextTemperature(); registerContext.setRegistrationId("12345"); Registration registration = new Registration(Instant.now().plus(1, ChronoUnit.DAYS), registerContext); registrationsRepository.saveRegistration(registration); Assert.assertEquals(1, registrationsRepository.getAllRegistrations().size()); registrationsRepository.removeRegistration("12345"); Assert.assertEquals(0, registrationsRepository.getAllRegistrations().size()); }