   
   func testThatRoutePostMethodShouldSetAnyIntValue() throws {
     // arrange
-    let beat = 488
+    let beat = Int.randomValue()
     let heartbeat = Heartbeat(beat: beat)
     let json = try heartbeat.makeJSON()
     let reqBody = try Body(json)
     let req = Request(method: .post, uri: "/heartbeat", headers: ["Content-Type": "application/json"], body: reqBody)
-    
     // act & assert
     try drop
       .testResponse(to: req)

      .assertJSON("beat", equals: beat)
  }
  
  func testThatRouteGet204NoContectForEmptyBeatTable() throws {
    // arange
    try Heartbeat.makeQuery().delete()
    // act & assert
    try drop
      .testResponse(to: .get, at: "heartbeat")

  }
  
  func testThatRouteHearbeatScenarioIsCorrect() throws {
    
    func makePostRequestForHeartbeat(with beat: Int) throws {
      // arrange
      let heartbeat = Heartbeat(beat: beat)
      let json = try heartbeat.makeJSON()
      let reqBody = try Body(json)
      let req = Request(method: .post, uri: "/heartbeat", headers: ["Content-Type": "application/json"], body: reqBody)
      // act & assert
      try drop
        .testResponse(to: req)
        .assertStatus(is: .ok)
        .assertJSON("beat", equals: beat)
      try drop
        .testResponse(to: .get, at: "heartbeat")
        .assertStatus(is: .ok)
        .assertJSON("beat", equals: beat)
    }
    
    try makePostRequestForHeartbeat(with: 1)
    try makePostRequestForHeartbeat(with: 2)
    try makePostRequestForHeartbeat(with: 1)
    try makePostRequestForHeartbeat(with: 2)
  
  }
  
  // MARK: - Helper functions & extensions
  func setBeat(to value: Int) throws -> ResponseRepresentable {
    let req = Request.makeTest(method: .post)
    req.json =  try JSON(node: ["beat":value])
