NominatingCandidateRequest implements Serializable { public Nominator toNominator() { return new Nominator(nominatorId, nominatorName, nominatorEmail, nominatorRole); } NominatingCandidateRequest();  NominatingCandidateRequest(String ticketId,
                                      String trainingId,
                                      String candidateId,
                                      String candidateName,
                                      String candidateEmail,
                                      String nominatorId,
                                      String nominatorName,
                                      String nominatorEmail,
                                      TrainingRole nominatorRole); TicketId getTicketId(); TrainingId getTrainingId(); String getCandidateId(); String getCandidateName(); String getCandidateEmail(); String getNominatorId(); String getNominatorName(); String getNominatorEmail(); TrainingRole getNominatorRole(); Candidate toCandidate(); Nominator toNominator();  }
@Test public void should_compose_Nominator() { nominatingCandidateRequest = createNominationRequest(); Nominator expectedNominator = new Nominator(nominatorId, nominatorName, nominatorEmail, TrainingRole.Coordinator); Nominator nominator = nominatingCandidateRequest.toNominator(); assertThat(nominator).isEqualTo(expectedNominator); }