public int solePartition() {
        int candidateResult = bitSet.nextSetBit(0);
        if (bitSet.nextSetBit(candidateResult + 1) < 0) {
            return candidateResult;
        } else {
            return -1;
        }
    }
@Test
    public void test_solePartition() {
        assertEquals(0, createWithPartitionCount(10, 0).solePartition());
        assertEquals(1, createWithPartitionCount(10, 1).solePartition());
        assertEquals(9, createWithPartitionCount(10, 9).solePartition());
        assertEquals(-1, createWithPartitionCount(10, 0, 1).solePartition());
        assertEquals(-1, createWithPartitionCount(10, 0, 9).solePartition());
    }