@Test(expected=JobClientActorSubmissionTimeoutException.class)
public void testSubmissionTimeout() throws Exception {

	FiniteDuration jobClientActorTimeout = new FiniteDuration(5, TimeUnit.SECONDS);
	FiniteDuration timeout = jobClientActorTimeout.$times(2);
	UUID leaderSessionID = UUID.randomUUID();
	ActorRef jobManager = system.actorOf(
		Props.create(
			PlainActor.class,
			leaderSessionID));
	TestingLeaderRetrievalService testingLeaderRetrievalService = new TestingLeaderRetrievalService(
		jobManager.path().toString(),
		leaderSessionID
	);
	Props jobClientActorProps = JobClientActor.createJobClientActorProps(
		testingLeaderRetrievalService,
		jobClientActorTimeout,
		false);
	ActorRef jobClientActor = system.actorOf(jobClientActorProps);
	Future<Object> jobExecutionResult = Patterns.ask(
		jobClientActor,
		new JobClientMessages.SubmitJobAndWait(testJobGraph),
		new Timeout(timeout));
	Await.result(jobExecutionResult, timeout);
}