@Test
public void workflowTaskToProto() {

  final WorkflowTask taskWithDefaultRetryCount = new WorkflowTask();
  final WorkflowTask taskWith1RetryCount = new WorkflowTask();
  taskWith1RetryCount.setRetryCount(1);
  final WorkflowTask taskWithNoRetryCount = new WorkflowTask();
  taskWithNoRetryCount.setRetryCount(0);
  assertEquals(-1, mapper.toProto(taskWithDefaultRetryCount).getRetryCount());
  assertEquals(1, mapper.toProto(taskWith1RetryCount).getRetryCount());
  assertEquals(0, mapper.toProto(taskWithNoRetryCount).getRetryCount());
}