public void shouldHandleSuccessfulBucketDeletion() throws Exception {
    mojo.execute();

    verify(mockCouchbaseClient).deleteBucket(BUCKET_NAME);
    verify(mockMavenLog).info("Deleted bucket '" + BUCKET_NAME + "'");

    verifyNoMoreInteractions(mockCouchbaseClient, mockMavenLog);
  }
  public void shouldHandleUnsuccessfulBucketDeletion() throws Exception {
    final CouchbaseException ex = new CouchbaseException("Oops!", errors);
    doThrow(ex).when(mockCouchbaseClient).deleteBucket(anyString());

    mojo.execute();

    verify(mockCouchbaseClient).deleteBucket(BUCKET_NAME);
    verify(mojo).logFailure(ex);

    verifyNoMoreInteractions(mockCouchbaseClient);
  }
  @BeforeMethod
  public void beforeMethod() {
    initMocks(this);

    mojo.setBucketName(BUCKET_NAME);
  }