             default:
                 break
             }
-            expec.fulfill()
+            self.expec.fulfill()
         }
-        waitForExpectations(timeout: 2, handler: nil)
+        wait()
     }
     
     func testPOSTValidPath() {
-        let expec = expectation(description: "GET unit testing")
-        
-        var manager = NetworkManagerMock()
-        manager.injectTestCode { (url, options, methodType, completion) in
-            XCTAssertEqual(url, URL(string: "\(baseURLString)/post")!)
-            XCTAssertEqual(options.count, 0)
-            XCTAssertEqual(methodType, .POST)
-            
-            completion(Result.success(Data()))
-        }
-        
         let client = try! RestClient(baseURLString: baseURLString, manager: manager)
         client.post(path: "/post") { (res) in
-            expec.fulfill()
+            self.expec.fulfill()
         }
-        waitForExpectations(timeout: 2, handler: nil)
+        let request = getRequest()!
+        
+        XCTAssertEqual(request.url, URL(string: "\(self.baseURLString)/post")!)
+        XCTAssertEqual(request.allHTTPHeaderFields!, [String:String]())
+        XCTAssertEqual(request.httpBody, nil)
+        XCTAssertEqual(request.httpMethod, MethodType.POST.rawValue)
+        
+        wait()
     }
 }

import XCTest

@testable import PocketCastsKit
class RestClientTests: XCTestCase {}

private let baseURLString = "http://localhoast"

// MARK: - Init
extension RestClientTests {
    func testRestClientWithInvalidURL() {
        XCTAssertThrowsError(try RestClient(baseURLString: ""))
    }
    
    func testRestClientWithValidURL() {

            return
        }
        XCTAssertEqual(client.baseURL, URL(string: baseURLString)!)
        fulfill()
    }
}

// MARK: - Testing GET
@testable import PocketCastsKit
extension RestClientTests {
    func testGETInvalidPath() {
        let client = try! RestClient(baseURLString: baseURLString)
        client.get(path: "") { (result) in
            switch result {
