test_class.declarator: dbMapper
test_class.modifier: private
test_class.original_string: private DbMapper dbMapper;
test_class.type: DbMapper
test_class.var_name: dbMapper
test_class.declarator: moshi = new Moshi.Builder().build()
test_class.modifier: private final
test_class.original_string: private final Moshi moshi = new Moshi.Builder().build();
test_class.type: Moshi
test_class.var_name: moshi
test_class.declarator: appMapper = new AppMapper()
test_class.modifier: private final
test_class.original_string: private final AppMapper appMapper = new AppMapper();
test_class.type: AppMapper
test_class.var_name: appMapper
test_class.declarator: now = LocalDateTime.now()
test_class.modifier: private final
test_class.original_string: private final LocalDateTime now = LocalDateTime.now();
test_class.type: LocalDateTime
test_class.var_name: now
test_class.declarator: adapter
test_class.modifier: @Mock
test_class.original_string: @Mock LocalDateTimeAdapter adapter;
test_class.type: LocalDateTimeAdapter
test_class.var_name: adapter
test_class.file: app/src/test/java/com/nilhcem/mobilization/data/database/DbMapperTest.java
test_class.identifier: DbMapperTest
test_case.body: @Test
      public void should_convert_db_sessions_to_app_sessions() {
          // Given
          when(adapter.fromText("now")).thenReturn(now);
          com.nilhcem.mobilization.data.database.model.Session session = new com.nilhcem.mobilization.data.database.model.Session(2, "now", 10, 3, "[1]", "title", "description");
          List<com.nilhcem.mobilization.data.database.model.Session> sessions = singletonList(session);
          Map<Integer, Speaker> speakersMap = new HashMap<>();
          Speaker speaker = new Speaker(1, "name", null, null, null, null, null, null);
          speakersMap.put(1, speaker);
  
          // When
          List<Session> result = dbMapper.toAppSessions(sessions, speakersMap);
  
          // Then
          assertThat(result).hasSize(1);
          assertThat(result.get(0).getId()).isEqualTo(2);
          assertThat(result.get(0).getFromTime()).isEqualTo(now);
          assertThat(result.get(0).getTitle()).isEqualTo("title");
          assertThat(result.get(0).getDescription()).isEqualTo("description");
          assertThat(result.get(0).getSpeakers().get(0)).isEqualTo(speaker);
      }
test_case.class_method_signature: DbMapperTest.should_convert_db_sessions_to_app_sessions()
test_case.full_signature: @Test public void should_convert_db_sessions_to_app_sessions()
test_case.identifier: should_convert_db_sessions_to_app_sessions
test_case.invocations: thenReturn when fromText singletonList put toAppSessions hasSize assertThat isEqualTo assertThat getId get isEqualTo assertThat getFromTime get isEqualTo assertThat getTitle get isEqualTo assertThat getDescription get isEqualTo assertThat get getSpeakers get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_convert_db_sessions_to_app_sessions()
focal_class.declarator: appMapper
focal_class.modifier: private final
focal_class.original_string: private final AppMapper appMapper;
focal_class.type: AppMapper
focal_class.var_name: appMapper
focal_class.declarator: localDateTimeAdapter
focal_class.modifier: private final
focal_class.original_string: private final LocalDateTimeAdapter localDateTimeAdapter;
focal_class.type: LocalDateTimeAdapter
focal_class.var_name: localDateTimeAdapter
focal_class.declarator: intListAdapter
focal_class.modifier: private final
focal_class.original_string: private final JsonAdapter<List<Integer>> intListAdapter;
focal_class.type: JsonAdapter<List<Integer>>
focal_class.var_name: intListAdapter
focal_class.file: app/src/main/java/com/nilhcem/mobilization/data/database/DbMapper.java
focal_class.identifier: DbMapper
focal_class.class_method_signature: DbMapper.DbMapper(Moshi moshi, AppMapper appMapper, LocalDateTimeAdapter localDateTimeAdapter)
focal_class.full_signature: @Inject public  DbMapper(Moshi moshi, AppMapper appMapper, LocalDateTimeAdapter localDateTimeAdapter)
focal_class.identifier: DbMapper
focal_class.modifiers: @Inject public
focal_class.parameters: (Moshi moshi, AppMapper appMapper, LocalDateTimeAdapter localDateTimeAdapter)
focal_class.signature:  DbMapper(Moshi moshi, AppMapper appMapper, LocalDateTimeAdapter localDateTimeAdapter)
focal_class.class_method_signature: DbMapper.toAppSessions(@NonNull List<Session> from, @NonNull Map<Integer, com.nilhcem.mobilization.data.app.model.Speaker> speakersMap)
focal_class.full_signature: public List<com.nilhcem.mobilization.data.app.model.Session> toAppSessions(@NonNull List<Session> from, @NonNull Map<Integer, com.nilhcem.mobilization.data.app.model.Speaker> speakersMap)
focal_class.identifier: toAppSessions
focal_class.modifiers: public
focal_class.parameters: (@NonNull List<Session> from, @NonNull Map<Integer, com.nilhcem.mobilization.data.app.model.Speaker> speakersMap)
focal_class.return: List<com.nilhcem.mobilization.data.app.model.Session>
focal_class.signature: List<com.nilhcem.mobilization.data.app.model.Session> toAppSessions(@NonNull List<Session> from, @NonNull Map<Integer, com.nilhcem.mobilization.data.app.model.Speaker> speakersMap)
focal_class.class_method_signature: DbMapper.fromAppSession(@Nullable com.nilhcem.mobilization.data.app.model.Session from)
focal_class.full_signature: public Session fromAppSession(@Nullable com.nilhcem.mobilization.data.app.model.Session from)
focal_class.identifier: fromAppSession
focal_class.modifiers: public
focal_class.parameters: (@Nullable com.nilhcem.mobilization.data.app.model.Session from)
focal_class.return: Session
focal_class.signature: Session fromAppSession(@Nullable com.nilhcem.mobilization.data.app.model.Session from)
focal_class.class_method_signature: DbMapper.fromAppSpeaker(@Nullable com.nilhcem.mobilization.data.app.model.Speaker from)
focal_class.full_signature: public Speaker fromAppSpeaker(@Nullable com.nilhcem.mobilization.data.app.model.Speaker from)
focal_class.identifier: fromAppSpeaker
focal_class.modifiers: public
focal_class.parameters: (@Nullable com.nilhcem.mobilization.data.app.model.Speaker from)
focal_class.return: Speaker
focal_class.signature: Speaker fromAppSpeaker(@Nullable com.nilhcem.mobilization.data.app.model.Speaker from)
focal_class.class_method_signature: DbMapper.toAppSpeakers(@Nullable List<Speaker> from)
focal_class.full_signature: public List<com.nilhcem.mobilization.data.app.model.Speaker> toAppSpeakers(@Nullable List<Speaker> from)
focal_class.identifier: toAppSpeakers
focal_class.modifiers: public
focal_class.parameters: (@Nullable List<Speaker> from)
focal_class.return: List<com.nilhcem.mobilization.data.app.model.Speaker>
focal_class.signature: List<com.nilhcem.mobilization.data.app.model.Speaker> toAppSpeakers(@Nullable List<Speaker> from)
focal_class.class_method_signature: DbMapper.serialize(@Nullable List<Integer> toSerialize)
focal_class.full_signature: private String serialize(@Nullable List<Integer> toSerialize)
focal_class.identifier: serialize
focal_class.modifiers: private
focal_class.parameters: (@Nullable List<Integer> toSerialize)
focal_class.return: String
focal_class.signature: String serialize(@Nullable List<Integer> toSerialize)
focal_class.class_method_signature: DbMapper.deserialize(@Nullable String toDeserialize)
focal_class.full_signature: private List<Integer> deserialize(@Nullable String toDeserialize)
focal_class.identifier: deserialize
focal_class.modifiers: private
focal_class.parameters: (@Nullable String toDeserialize)
focal_class.return: List<Integer>
focal_class.signature: List<Integer> deserialize(@Nullable String toDeserialize)
focal_method.body: public List<com.nilhcem.mobilization.data.app.model.Session> toAppSessions(@NonNull List<Session> from, @NonNull Map<Integer, com.nilhcem.mobilization.data.app.model.Speaker> speakersMap) {
          return stream(from).map(session -> {
              LocalDateTime fromTime = localDateTimeAdapter.fromText(session.startAt);
              return new com.nilhcem.mobilization.data.app.model.Session(session.id, Room.getFromId(session.roomId).label,
                      appMapper.toSpeakersList(deserialize(session.speakersIds), speakersMap),
                      session.title, session.description, fromTime, fromTime.plusMinutes(session.duration));
          }).collect(Collectors.toList());
      }
focal_method.class_method_signature: DbMapper.toAppSessions(@NonNull List<Session> from, @NonNull Map<Integer, com.nilhcem.mobilization.data.app.model.Speaker> speakersMap)
focal_method.full_signature: public List<com.nilhcem.mobilization.data.app.model.Session> toAppSessions(@NonNull List<Session> from, @NonNull Map<Integer, com.nilhcem.mobilization.data.app.model.Speaker> speakersMap)
focal_method.identifier: toAppSessions
focal_method.invocations: collect map stream fromText getFromId toSpeakersList deserialize plusMinutes toList
focal_method.modifiers: public
focal_method.parameters: (@NonNull List<Session> from, @NonNull Map<Integer, com.nilhcem.mobilization.data.app.model.Speaker> speakersMap)
focal_method.return: List<com.nilhcem.mobilization.data.app.model.Session>
focal_method.signature: List<com.nilhcem.mobilization.data.app.model.Session> toAppSessions(@NonNull List<Session> from, @NonNull Map<Integer, com.nilhcem.mobilization.data.app.model.Speaker> speakersMap)