public Timestamp updateToScheduled(List<String> partitionTokens) {
    final TransactionResult<Void> transactionResult =
        runInTransaction(
            transaction -> transaction.updateToScheduled(partitionTokens), "updateToScheduled");
    return transactionResult.getCommitTimestamp();
  }
@Test
  public void testInTransactionContextCannotUpdateToScheduled() {
    System.out.println("Cannot update to scheduled");
    ResultSet resultSet = mock(ResultSet.class);
    when(transaction.executeQuery(any(), anyObject())).thenReturn(resultSet);
    when(resultSet.next()).thenReturn(false);

    ArgumentCaptor<ImmutableList<Mutation>> mutations =
        ArgumentCaptor.forClass(ImmutableList.class);
    doNothing().when(transaction).buffer(mutations.capture());
    assertNull(inTransactionContext.updateToScheduled(Collections.singletonList(PARTITION_TOKEN)));
    verify(transaction, times(0)).buffer(mutations.capture());
  }