public MockApplication<P> init() throws Exception {
if (lifeCycle == null) {
assertCompile();
}
if (lifeCycle != null) {
Completion refresh = lifeCycle.refresh();
if (refresh.isFailed()) {
throw refresh.getCause();
} else {
return this;
}
} else {
throw new IllegalStateException("Could not compile application");