### Question:
QueryRoot extends QueryPart { public static QueryRoot create(String method, RepositoryMetadata repo, RepositoryMethodPrefix prefix) { QueryRoot root = new QueryRoot(repo.getEntityMetadata().getEntityName(), prefix); root.build(method, method, repo); root.createJpql(); return root; } protected  QueryRoot(String entityName, RepositoryMethodPrefix methodPrefix); static QueryRoot create(String method, RepositoryMetadata repo, RepositoryMethodPrefix prefix); String getJpqlQuery(); List<ParameterUpdate> getParameterUpdates(); static final QueryRoot UNKNOWN_ROOT; }### Answer:
@Test(expected = MethodExpressionException.class) public void should_fail_in_where() { final String name = "findByInvalid"; QueryRoot.create(name, repo, prefix(name)); }
@Test(expected = MethodExpressionException.class) public void should_fail_with_prefix_only() { final String name = "findBy"; QueryRoot.create(name, repo, prefix(name)); }
@Test(expected = MethodExpressionException.class) public void should_fail_in_order_by() { final String name = "findByNameOrderByInvalidDesc"; QueryRoot.create(name, repo, prefix(name)); }