EmailMessage { public String getBccToString() { if (getBcc().isEmpty()) { return ""; } StringBuilder result = new StringBuilder(); for (String emailAddress : getBcc()) { result.append(emailAddress).append(","); } return result.toString().substring(0, result.toString().length() - 1); } EmailMessage();  EmailMessage(String from, String to, List<String> cc, String subject, String content);  EmailMessage(String from, String to, List<String> cc, List<String> bcc, String subject, String content); String getFrom(); void setFrom(String from); String getTo(); void setTo(String to); List<String> getCc(); void setCc(List<String> cc); String getSubject(); void setSubject(String subject); String getContent(); void setContent(String content); List<String> getBcc(); String getBccToString(); String getCcToString(); void setBcc(List<String> bcc); void send(); InternetAddress[] getReplyTo(); void addReplyTo(InternetAddress... internetAddresses);  }
@Test public void testGetBccToString() { EmailMessage instance = new EmailMessage(); String expResult = ""; String result = instance.getBccToString(); assertEquals(expResult, result); }
@Test public void testGetBCCToString() { EmailMessage instance = new EmailMessage(); List<String> input = new ArrayList<String>(); input.add("test@test.com"); instance.setBcc(input); String result = instance.getBccToString(); assertFalse("".equals(result)); assertEquals("test@test.com", result); }