@Test
public void storePullRequest() throws PersistenceException {

    PullRequestEntity pullEntity = updManager.storeMessageUnit(TestData.pull5);
    assertNotNull(pullEntity);
    assertEquals(TestData.pull5.getMessageId(), pullEntity.getMessageId());
    assertEquals(TestData.pull5.getRefToMessageId(), pullEntity.getRefToMessageId());
    assertEquals(TestData.pull5.getTimestamp(), pullEntity.getTimestamp());
    pullEntity = updManager.storeMessageUnit(TestData.pull6);
    assertNotNull(pullEntity);
    assertTrue(pullEntity instanceof ISelectivePullRequest);
    assertEquals(TestData.pull6.getMessageId(), pullEntity.getMessageId());
    assertEquals(TestData.pull6.getRefToMessageId(), pullEntity.getRefToMessageId());
    assertEquals(TestData.pull6.getTimestamp(), pullEntity.getTimestamp());
    assertEquals(TestData.pull6.getReferencedMessageId(),
                    ((ISelectivePullRequest) pullEntity).getReferencedMessageId());
    assertNull(((ISelectivePullRequest) pullEntity).getConversationId());
    assertNull(((ISelectivePullRequest) pullEntity).getAgreementRef());
    assertNull(((ISelectivePullRequest) pullEntity).getService());
    assertNull(((ISelectivePullRequest) pullEntity).getAction());
    pullEntity = updManager.storeMessageUnit(TestData.pull7);
    assertNotNull(pullEntity);
    assertTrue(pullEntity instanceof ISelectivePullRequest);
    assertEquals(TestData.pull7.getMessageId(), pullEntity.getMessageId());
    assertEquals(TestData.pull7.getRefToMessageId(), pullEntity.getRefToMessageId());
    assertEquals(TestData.pull7.getTimestamp(), pullEntity.getTimestamp());
    assertNull(((ISelectivePullRequest) pullEntity).getReferencedMessageId());
    assertEquals(TestData.pull7.getConversationId() ,((ISelectivePullRequest) pullEntity).getConversationId());
    assertNotNull(((ISelectivePullRequest) pullEntity).getAgreementRef());
    assertEquals(TestData.pull7.getAgreementRef().getName(),
                                                ((ISelectivePullRequest) pullEntity).getAgreementRef().getName());
    assertEquals(TestData.pull7.getAgreementRef().getType(),
                                                ((ISelectivePullRequest) pullEntity).getAgreementRef().getType());
    assertNotNull(((ISelectivePullRequest) pullEntity).getService());
    assertTrue(CompareUtils.areEqual(TestData.pull7.getService(), ((ISelectivePullRequest) pullEntity).getService()));
    assertNull(((ISelectivePullRequest) pullEntity).getAction());
}