@AfterTest public void deleteResources(){
  File storageFolder=getStorageFolder();
  if (storageFolder.exists()) {
    File[] files=storageFolder.listFiles();
    for (    File file : files) {
      assertThat("Can not delete storage test file.",file.delete(),is(true));
    }
    assertThat("Can not delete storage test folder.",storageFolder.delete(),is(true));
  }
}

@ AfterTest public void deleteResources ( ) { File storageFolder = getStorageFolder ( ) ; if ( storageFolder . exists ( ) ) { File [ ] files = storageFolder . listFiles ( ) ; for ( File file : files ) { assertThat ( "Can not delete storage test file." , file . delete ( ) , is ( true ) ) ; } assertThat ( "Can not delete storage test folder." , storageFolder . delete ( ) , is ( true ) ) ; } }
deletes created files after the test .
