public class BuildCauseTest {
@Test
public void should_export_env_vars() {
BuildCause cause = mock(BuildCause.class);
doCallRealMethod().when(cause).getEnvVars();
doReturn("sha1234").when(cause).getSha();
doReturn("surya").when(cause).getPusher();
doReturn("44").when(cause).getPullRequestNumber();
assertNotNull(cause.getEnvVars());
assertEquals("sha1234", cause.getEnvVars().get("DOTCI_SHA"));
assertEquals("surya", cause.getEnvVars().get("DOTCI_PUSHER"));
assertEquals("44", cause.getEnvVars().get("DOTCI_PULL_REQUEST"));
}