 import XCTest
 
 @testable import PocketCastsKit
-class RestClientTests: XCTestCase {}
+class RestClientTests: PCKTestCase {
+    
+    private func fulfill() {
+        expec.fulfill()
+        wait()
+    }
+}
 
-private let baseURLString = "http://localhoast"
-
-// MARK: - Init
+// MARK: - Testing initializing
 extension RestClientTests {
     func testRestClientWithInvalidURL() {
         XCTAssertThrowsError(try RestClient(baseURLString: ""))
+        fulfill()
     }
     
     func testRestClientWithValidURL() {

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

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

            default:
            break
            }
            self.expec.fulfill()
        }
        wait()
    }
    
    func testGETValidPath() {
        let client = try! RestClient(baseURLString: baseURLString, manager: manager)
        
        client.get(path: "/get") { (res) in
            self.expec.fulfill()
        }
        
        let request = getRequest()!
        XCTAssertEqual(request.url, URL(string: "\(self.baseURLString)/get")!)
        XCTAssertEqual(request.allHTTPHeaderFields!, [String:String]())
        XCTAssertEqual(request.httpBody, nil)
        XCTAssertEqual(request.httpMethod, MethodType.GET.rawValue)
        
        wait()
    }
}

// MARK: - POST
extension RestClientTests {
    func testPOSTInvalidPath() {
        let client = try! RestClient(baseURLString: baseURLString)
        client.post(path: "") { (result) in
            switch result {
