### Question:
SessionModelTool { public SessionModel buildGuiModel(final SessionState state, final Path file) { SessionModel model = buildGuiModel(state.getParticipants()); model.setDrawName(state.getDrawName()); model.setPassword(state.getPassword()); model.setSessionFile(file); return model; } @Inject  SessionModelTool(final I18nManager i18nManager); SessionModel buildGuiModel(final SessionState state, final Path file); SessionModel buildGuiModel(final List<ParticipantState> participants); SessionState buildFileModel(final SessionModel model);  }### Answer:
@Test public void testBuildGuiModel() { SessionState input = buildFullState(); SessionModel result = target.buildGuiModel(input, FILE); assertAll( () -> assertTrue(result.isChangesSaved()), () -> assertEquals(DRAW_NAME_1, result.getDrawName()), () -> assertEquals(PASSWORD, result.getPassword()), () -> assertEquals(FILE, result.getSessionFile()), () -> { List<ParticipantModel> participants = result.getParticipants(); assertAll( () -> assertEquals(PARTICIPANT_COUNT + 1, participants.size()), () -> validate(albert, participants.get(INDEX_ALBERT)), () -> validate(beryl, participants.get(INDEX_BERYL)), () -> validate(carla, participants.get(INDEX_CARLA)), () -> validate(david, participants.get(INDEX_DAVID)), () -> validate(edith, participants.get(INDEX_EDITH)), () -> validate(fred, participants.get(INDEX_FRED)), () -> validate(gina, participants.get(INDEX_GINA)), () -> validate(harry, participants.get(INDEX_HARRY)), () -> validate(iris, participants.get(INDEX_IRIS)), () -> validate(john, participants.get(INDEX_JOHN)), () -> validate(kate, participants.get(INDEX_KATE)), () -> validate(placeholder, participants.get(PARTICIPANT_COUNT)) ); } ); }