public String getJobName() {
        if (isBuilding()) {
            try {
                return buildLocator.split("/")[4];
            } catch (ArrayIndexOutOfBoundsException e) {
                return null;
            }
        }
        return null;
    }
@Test
    public void shouldReturnNullTheJobName() {
        AgentBuildingInfo agentBuildingInfo = new AgentBuildingInfo("buildInfo", "foo");
        assertNull(agentBuildingInfo.getJobName());
    }