### Question:
TransactionGroup extends Observable implements Observer, HasProgressCollection<TransactionGroup, Transaction> { @Override public long totalElements() { return transactions.size(); }  boolean isEmpty(); synchronized void add(Transaction transaction); int size(); synchronized void clear(); @Override double getProgress(); @Override long totalSize(); @Override long currentSize(); @Override TransactionGroup onProgress(Runnable runnable); @Override void update(Observable o, Object arg); synchronized void cancel(); @Override TransactionGroup onProgress(Consumer<Transaction> consumer); @Override long totalElements(); @Override long finishedElements(); static final long METADATA_SIZE; }### Answer:
@Test public void knowsWhenEmpty() { assertEquals(0, group.totalElements()); }