@Test public void buildObject() throws Exception { String projectId = "someProjectId"; String organizationId = "someOrgId"; ProjectToOrganization projOrg = converter.convert(createOafRelObject(projectId, organizationId)); assertNotNull(projOrg); assertEquals(projectId, projOrg.getProjectId()); assertEquals(organizationId, projOrg.getOrganizationId()); }
@Override public ProjectToOrganization convert(Relation relation) { Preconditions.checkNotNull(relation); ProjectToOrganization.Builder builder = ProjectToOrganization.newBuilder(); builder.setProjectId(relation.getSource()); builder.setOrganizationId(relation.getTarget()); return builder.build(); }
ProjectToOrganizationRelationConverter implements OafRelToAvroConverter<ProjectToOrganization> { @Override public ProjectToOrganization convert(Relation relation) { Preconditions.checkNotNull(relation); ProjectToOrganization.Builder builder = ProjectToOrganization.newBuilder(); builder.setProjectId(relation.getSource()); builder.setOrganizationId(relation.getTarget()); return builder.build(); } }
ProjectToOrganizationRelationConverter implements OafRelToAvroConverter<ProjectToOrganization> { @Override public ProjectToOrganization convert(Relation relation) { Preconditions.checkNotNull(relation); ProjectToOrganization.Builder builder = ProjectToOrganization.newBuilder(); builder.setProjectId(relation.getSource()); builder.setOrganizationId(relation.getTarget()); return builder.build(); }  }
ProjectToOrganizationRelationConverter implements OafRelToAvroConverter<ProjectToOrganization> { @Override public ProjectToOrganization convert(Relation relation) { Preconditions.checkNotNull(relation); ProjectToOrganization.Builder builder = ProjectToOrganization.newBuilder(); builder.setProjectId(relation.getSource()); builder.setOrganizationId(relation.getTarget()); return builder.build(); }  @Override ProjectToOrganization convert(Relation relation); }
ProjectToOrganizationRelationConverter implements OafRelToAvroConverter<ProjectToOrganization> { @Override public ProjectToOrganization convert(Relation relation) { Preconditions.checkNotNull(relation); ProjectToOrganization.Builder builder = ProjectToOrganization.newBuilder(); builder.setProjectId(relation.getSource()); builder.setOrganizationId(relation.getTarget()); return builder.build(); }  @Override ProjectToOrganization convert(Relation relation);  }