ObservableManager { public ObservableGroup newGroup() { long id = nextId.getAndIncrement(); ObservableGroup observableGroup = new ObservableGroup(id); observableGroupMap.put(id, observableGroup); return observableGroup; }  ObservableGroup getGroup(long groupId); ObservableGroup newGroup(); void destroy(ObservableGroup group);  }
@Test public void testNewGroup() { ObservableGroup group = observableManager.newGroup(); assertThat(group.id()).isEqualTo(1); }