@Test
public void storeViaParameters() throws Exception {

    final String entityId = "com.axway.test:1.0.0::jar";
    final String entityType = "DbArtifact";
    final String action = "Some Action";
    final String commentText = "Test Comment";
    DbCredential credential = new DbCredential();
    credential.setUser("testUser");
    final RepositoryHandler repo = mock(RepositoryHandler.class);
    final CommentHandler commentHandler = new CommentHandler(repo);
    commentHandler.store(entityId, action, commentText, credential, entityType);
    ArgumentCaptor<DbComment> captor = ArgumentCaptor.forClass(DbComment.class);
    verify(repo, times(1)).store(captor.capture());
    final DbComment arg = captor.getValue();
    assertEquals(action, arg.getAction());
    assertEquals(commentText, arg.getDbCommentText());
}