Workaround and testcase for IllegalArgumentException on not found resource