Collection { public void delete() throws SolrServerException, IOException { this.cluster.deleteCollection(this.name); } Collection(Cluster cluster, String name); void delete(); String getName();  }
@Test public void test_delete_collection() throws SolrServerException, IOException { String collection_name = "collection"; GIVEN.create_cluster(); THEN.create_collection_from_cluster(collection_name); AND.cluster_has_collection(collection_name); THEN.collection.delete(); }
@Test(expected = SolrServerException.class) public void test_fail_delete_collection() throws SolrServerException, IOException { String collection_name = "collection"; WHEN.create_cluster(); AND.cluster_has_collection("another_collection"); THEN.create_collection_from_cluster(collection_name); THEN.collection.delete(); }