@Test
public void testNullablePathParameter() throws Exception {

  @Api
  class Test {
    @ApiMethod(path = "path/{id}")
    public void foo(@Named("id") @Nullable String id) {}
  }
  try {
    g.generateConfig(Test.class);
    fail("Config generation for endpoint with nullable path parameter should have failed.");
  } catch (InvalidParameterAnnotationsException expected) {
    // expected
  }
}