Projects { public Project get() throws OdpsException { return get(getDefaultProjectName()); } Projects(RestClient client);   Projects(Odps odps); Project get(); Project get(String projectName); boolean exists(String projectName); void createExternalProject(final String projectName,
                                    final String comment,
                                    final String refProjectName,
                                    final Project.ExternalProjectProperties extProperties); void deleteExternalProject(final String projectName); void updateProject(final String projectName, final Map<String, String> properties); Iterator<Project> iterator(String owner); Iterable<Project> iterable(final String owner);  }
@Test public void testGet() throws OdpsException { Odps odps = OdpsTestUtils.newDefaultOdps(); Project prj = odps.projects().get(); prj.getLastModifiedTime(); }
@Test public void testUnmarshal() throws Exception { ListProjectResponse response = SimpleXmlUtils .unmarshal(xml.getBytes(), ListProjectResponse.class); List<ProjectModel> projects = response.projects; ProjectModel firstProject = projects.get(0); assertEquals("a_0220210335__387", firstProject.name); assertEquals("managed", firstProject.type); assertEquals("test replication prj", firstProject.comment); assertEquals("ALIYUN$odpstest5@aliyun-inc.com", firstProject.owner); assertEquals("AVAILABLE", firstProject.state); ProjectModel secondProject = projects.get(1); assertEquals("a_0220210337_test3_239", secondProject.name); assertEquals("external", secondProject.type); assertEquals("test replication prj", secondProject.comment); assertEquals("ALIYUN$odpstest5@aliyun-inc.com", secondProject.owner); assertEquals("AVAILABLE", secondProject.state); }