Migrate atBit example to unit test