Supplier<List<Post>> postsAsyncFallback() {
return () -> Lists.newArrayList(getPost());
}
private Post getPost() {
Post post = new Post();
post.setId(-1L);
post.setTitle("This is a fallback post for ");
post.setAuthor("System");
post.setBody("Hystrix caught an error, this is the fallback");
return post;
}