@Test
public void testTransition() throws Exception {
final Issue issue = client.getIssueClient().getIssue("TST-1", new NullProgressMonitor());
final Iterable<Transition> transitions = client.getIssueClient().getTransitions(issue, pm);
assertEquals(4, Iterables.size(transitions));
final Transition startProgressTransition = new Transition("Start Progress", IntegrationTestUtil.START_PROGRESS_TRANSITION_ID, Collections.<Transition.Field>emptyList());
assertTrue(Iterables.contains(transitions, startProgressTransition));
client.getIssueClient().transition(issue, new TransitionInput(IntegrationTestUtil.START_PROGRESS_TRANSITION_ID,
Collections.<FieldInput>emptyList(), Comment.valueOf("My test comment")), new NullProgressMonitor()) ;
final Issue transitionedIssue = client.getIssueClient().getIssue("TST-1", new NullProgressMonitor());
assertEquals("In Progress", transitionedIssue.getStatus().getName());
final Iterable<Transition> transitionsAfterTransition = client.getIssueClient().getTransitions(issue, pm);
assertFalse(Iterables.contains(transitionsAfterTransition, startProgressTransition));
final Transition stopProgressTransition = new Transition("Stop Progress", IntegrationTestUtil.STOP_PROGRESS_TRANSITION_ID, Collections.<Transition.Field>emptyList());
assertTrue(Iterables.contains(transitionsAfterTransition, stopProgressTransition));
}