}
@Test
public void testMultipleProperties()
{
MessageType mockedMessage = mock(MessageType.class);
BodyType mockedBody = mock(BodyType.class);
when(mockedMessage.isSetBody()).thenReturn(true);
when(mockedMessage.getBody()).thenReturn(mockedBody);
when(mockedBody.getStringValue()).thenReturn("Body of an email.");
when(mockedMessage.isSetSubject()).thenReturn(true);
when(mockedMessage.getSubject()).thenReturn("Subject of an email.");
when(mockedMessage.isSetToRecipients()).thenReturn(true);
ArrayOfRecipientsType recipients = assertRecipients();
when(mockedMessage.getToRecipients()).thenReturn(recipients);
MailboxItem mail = new ExchangeEmail(mockedMessage);
assertTrue(mail.hasKey("Body"));
assertTrue(mail.hasKey("Subject"));
assertFalse(mail.hasKey("Time Sent"));