public static <T> T readObjectFromJsonFileInClasspath(final String resourcePath, final TypeReference<T> typeReference) { final URL url = Resources.getResource(resourcePath); try { String jsonAsString = Resources.toString(url, Charsets.UTF_8); return readObjectFromJsonString(typeReference, jsonAsString); } catch (IOException e) { throw new RuntimeException(e); } }