Schedule { public static Schedule create(String name) throws Exception { Connection conn = null; try { conn = DriverManager.getConnection(url, "", ""); Statement statement = conn.createStatement(); statement.executeUpdate( "DELETE FROM schedule WHERE name = '" + name + "';"); return new Schedule(name); } finally { try { conn.close(); } catch (Exception ignored) {} } } Schedule(String name); static void deleteAll(); static Schedule create(String name); static Schedule find(String name); static Collection<Schedule> all(); void update(); void add(Offering offering); void authorizeOverload(boolean authorized); List<String> analysis(); void checkDuplicateCourses(ArrayList<String> analysis); void checkOverlap(ArrayList<String> analysis); String toString();  }
@Test public void testOfferingCreate() throws Exception { Course c = Course.create("CS202", 2); Offering offering = Offering.create(c, "M10"); assertNotNull(offering); }
@Test public void testPersistentSchedule() throws Exception { Schedule s = Schedule.create("Bob"); assertNotNull(s); }