@Test
public void should_find_state_build() throws Exception {

    TeamCityBuild build = new TeamCityBuild();
    build.setStatus("SUCCESS");
    when(teamCity.findBuild(anyString(), anyString())).thenReturn(build);
    SoftwareProjectId projectId = new SoftwareProjectId("projectId");
    BuildState state = teamCityConnection.getBuildState(projectId, "1234");
    assertEquals(BuildState.SUCCESS, state);
}