### Question:
PerSlotTransition implements StateTransition<BeaconStateEx> { @Override public BeaconStateEx apply(BeaconStateEx stateEx) { logger.trace(() -> "Applying slot transition to state: (" + spec.hash_tree_root(stateEx).toStringShort() + ") " + stateEx.toString(spec.getConstants(), spec::signing_root)); TransitionType.SLOT.checkCanBeAppliedAfter(stateEx.getTransition()); MutableBeaconState state = stateEx.createMutableCopy(); spec.process_slot(state); BeaconStateEx ret = new BeaconStateExImpl(state.createImmutable(), TransitionType.SLOT); logger.trace(() -> "Slot transition result state: (" + spec.hash_tree_root(ret).toStringShort() + ") " + ret.toString(spec.getConstants(), spec::signing_root)); return ret; } PerSlotTransition(BeaconChainSpec spec); @Override BeaconStateEx apply(BeaconStateEx stateEx);  }### Answer:
@Test public void test1() { Random rnd = new Random(); Time genesisTime = Time.castFrom(UInt64.random(rnd)); SpecConstants specConstants = new SpecConstants() { @Override public SlotNumber.EpochLength getSlotsPerEpoch() { return new SlotNumber.EpochLength(UInt64.valueOf(8)); } }; BeaconChainSpec spec = new BeaconChainSpec.Builder() .withConstants(specConstants) .withDefaultHasher(specConstants) .withDefaultHashFunction() .withVerifyDepositProof(false) .build(); List<Deposit> deposits = TestUtils.getAnyDeposits(rnd, spec, 8).getValue0(); Eth1Data eth1Data = new Eth1Data(Hash32.random(rnd), UInt64.valueOf(deposits.size()), Hash32.random(rnd)); InitialStateTransition initialStateTransition = new InitialStateTransition( new ChainStart(genesisTime, eth1Data, deposits), spec); BeaconStateEx initialState = initialStateTransition.apply(spec.get_empty_block()); BeaconStateEx s1State = ExtendedSlotTransition.create(spec).apply(initialState); BeaconStateEx s2State = ExtendedSlotTransition.create(spec).apply(s1State); BeaconStateEx s3State = ExtendedSlotTransition.create(spec).apply(s2State); Assert.assertEquals(specConstants.getGenesisSlot().plus(3), s3State.getSlot()); }