test_class.declarator: thrown= ExpectedException.none()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedException thrown= ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: thrown
test_class.declarator: registrationsRepository
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      RegistrationsRepository registrationsRepository;
test_class.type: RegistrationsRepository
test_class.var_name: registrationsRepository
test_class.declarator: jdbcTemplate
test_class.modifier: @Autowired
      protected
test_class.original_string: @Autowired
      protected JdbcTemplate jdbcTemplate;
test_class.type: JdbcTemplate
test_class.var_name: jdbcTemplate
test_class.file: cepheus-broker/src/test/java/com/orange/cepheus/broker/persistence/RegistrationsRepositoryTest.java
test_class.identifier: RegistrationsRepositoryTest
test_case.body: @Test
      public void getAllRegistrationsEmptyTest() throws URISyntaxException, RegistrationPersistenceException {
          Assert.assertEquals(0, registrationsRepository.getAllRegistrations().size());
      }
test_case.class_method_signature: RegistrationsRepositoryTest.getAllRegistrationsEmptyTest()
test_case.full_signature: @Test public void getAllRegistrationsEmptyTest()
test_case.identifier: getAllRegistrationsEmptyTest
test_case.invocations: assertEquals size getAllRegistrations
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getAllRegistrationsEmptyTest()
focal_class.declarator: logger = LoggerFactory.getLogger(RegistrationsRepository.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger logger = LoggerFactory.getLogger(RegistrationsRepository.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: jdbcTemplate
focal_class.modifier: @Autowired
      protected
focal_class.original_string: @Autowired
      protected JdbcTemplate jdbcTemplate;
focal_class.type: JdbcTemplate
focal_class.var_name: jdbcTemplate
focal_class.declarator: mapper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ObjectMapper mapper;
focal_class.type: ObjectMapper
focal_class.var_name: mapper
focal_class.file: cepheus-broker/src/main/java/com/orange/cepheus/broker/persistence/RegistrationsRepository.java
focal_class.identifier: RegistrationsRepository
focal_class.class_method_signature: RegistrationsRepository.createTableOnStartup()
focal_class.full_signature: @PostConstruct protected void createTableOnStartup()
focal_class.identifier: createTableOnStartup
focal_class.modifiers: @PostConstruct protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void createTableOnStartup()
focal_class.class_method_signature: RegistrationsRepository.saveRegistration(Registration registration)
focal_class.full_signature: public void saveRegistration(Registration registration)
focal_class.identifier: saveRegistration
focal_class.modifiers: public
focal_class.parameters: (Registration registration)
focal_class.return: void
focal_class.signature: void saveRegistration(Registration registration)
focal_class.class_method_signature: RegistrationsRepository.updateRegistration(Registration registration)
focal_class.full_signature: public void updateRegistration(Registration registration)
focal_class.identifier: updateRegistration
focal_class.modifiers: public
focal_class.parameters: (Registration registration)
focal_class.return: void
focal_class.signature: void updateRegistration(Registration registration)
focal_class.class_method_signature: RegistrationsRepository.getAllRegistrations()
focal_class.full_signature: public Map<String, Registration> getAllRegistrations()
focal_class.identifier: getAllRegistrations
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, Registration>
focal_class.signature: Map<String, Registration> getAllRegistrations()
focal_class.class_method_signature: RegistrationsRepository.getRegistration(String registrationId)
focal_class.full_signature: public Registration getRegistration(String registrationId)
focal_class.identifier: getRegistration
focal_class.modifiers: public
focal_class.parameters: (String registrationId)
focal_class.return: Registration
focal_class.signature: Registration getRegistration(String registrationId)
focal_class.class_method_signature: RegistrationsRepository.removeRegistration(String registrationId)
focal_class.full_signature: public void removeRegistration(String registrationId)
focal_class.identifier: removeRegistration
focal_class.modifiers: public
focal_class.parameters: (String registrationId)
focal_class.return: void
focal_class.signature: void removeRegistration(String registrationId)
focal_method.body: public Map<String, Registration> getAllRegistrations() throws RegistrationPersistenceException {
          Map<String, Registration> registrations = new ConcurrentHashMap<>();
          try {
              List<Registration> registrationList = jdbcTemplate.query("select id, expirationDate, registerContext from t_registrations",
                      (ResultSet rs, int rowNum) ->  {
                          Registration registration = new Registration();
                          try {
                              registration.setExpirationDate(Instant.parse(rs.getString("expirationDate")));
                              registration.setRegisterContext(mapper.readValue(rs.getString("registerContext"), RegisterContext.class));
                          } catch (IOException e) {
                              throw new SQLException(e);
                          }
                          return registration;
                      });
              registrationList.forEach(registration -> registrations.put(registration.getRegisterContext().getRegistrationId(), registration));
          } catch (DataAccessException e) {
              throw new RegistrationPersistenceException(e);
          }
          return registrations;
      }
focal_method.class_method_signature: RegistrationsRepository.getAllRegistrations()
focal_method.full_signature: public Map<String, Registration> getAllRegistrations()
focal_method.identifier: getAllRegistrations
focal_method.invocations: query setExpirationDate parse getString setRegisterContext readValue getString forEach put getRegistrationId getRegisterContext
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: Map<String, Registration>
focal_method.signature: Map<String, Registration> getAllRegistrations()