public void testJoinTableSetSchemaNull() throws Exception {
    ICompilationUnit cu = this.createTestAssociationOverrideJoinTableWithSchema();
    JavaResourceType resourceType = buildJavaResourceType(cu);
    AssociationOverrideAnnotation2_0 associationOverride =
        this.associationOverrideAt(0, resourceType);
    JoinTableAnnotation table = associationOverride.getJoinTable();
    assertEquals(SCHEMA_NAME, table.getSchema());

    table.setSchema(null);
    assertNull(table.getSchema());

    assertSourceDoesNotContain("@JoinTable(", cu);
  }
  public void testJoinTableSetSchema() throws Exception {
    ICompilationUnit cu = this.createTestAssociationOverrideWithJoinTable();
    JavaResourceType resourceType = buildJavaResourceType(cu);
    AssociationOverrideAnnotation2_0 associationOverride =
        this.associationOverrideAt(0, resourceType);
    JoinTableAnnotation table = associationOverride.getJoinTable();
    assertNotNull(table);
    assertNull(table.getSchema());

    table.setSchema("Foo");
    assertEquals("Foo", table.getSchema());

    assertSourceContains(
        "@AssociationOverride(name = \""
            + ASSOCIATION_OVERRIDE_NAME
            + "\", joinTable = @JoinTable(name = \"MY_JOIN_TABLE\", schema = \"Foo\"))",
        cu);
  }