function createValidRoutingTable (
  database,
  routerAddress,
  rawRoutingTable
) {
  const ttl = rawRoutingTable.ttl
  const expirationTime = calculateExpirationTime(rawRoutingTable, routerAddress)
  const { routers, readers, writers } = parseServers(
    rawRoutingTable,
    routerAddress
  )

  assertNonEmpty(routers, 'routers', routerAddress)
  assertNonEmpty(readers, 'readers', routerAddress)

  return new RoutingTable({
    database: database || rawRoutingTable.db,
    routers,
    readers,
    writers,
    expirationTime,
    ttl
  })
}
Create a valid routing table from a raw object

@param {string} db the database name. It is used for logging purposes
@param {ServerAddress} routerAddress The router address, it is used for loggin purposes
@param {RawRoutingTable} rawRoutingTable Method used to get the raw routing table to be processed
@param {RoutingTable} The valid Routing Table