Add cleanup for endpoint tests

In endpoint tests, cleanup is not handled in case
of any exception during creation and deletion of endpoint.

This commit adds the cleanup part for exception case too.

Change-Id: I6d9a1c01d3b7311e542dce88c11b21efb7759f26
1 file changed