test_that("kcore sampling works", {
    library(igraph)
    cores00 <- c(0, 0, 0)
    cores01 <- c(1, 1, 1)
    cores02 <- c(2, 2, 2)
    coresNA <- c(4, 2, 2)
    coresCl <- c(4, 4, 4, 4, 4)
    expect_equal(coreness(sample_coreseq(cores00)), cores00)
    expect_equal(coreness(sample_coreseq(cores01)), cores01)
    expect_equal(coreness(sample_coreseq(cores02)), cores02)
    expect_error(sample_coreseq(coresNA))
    expect_equal(coreness(sample_coreseq(coresCl)), coresCl)
})
