### Question:
InitialStateTransition implements BlockTransition<BeaconStateEx> { public BeaconStateEx apply(BeaconBlock block) { return apply(null, block); } InitialStateTransition(ChainStart depositContractStart,
      BeaconChainSpec spec); BeaconStateEx apply(BeaconBlock block); @Override BeaconStateEx apply(BeaconStateEx state, BeaconBlock block);  }### Answer:
@Test public void handleChainStartCorrectly() { BeaconChainSpec spec = BeaconChainSpec.createWithDefaults(); Random rnd = new Random(); Time eth1Time = Time.castFrom(UInt64.random(rnd)); List<Deposit> deposits = Collections.emptyList(); ReadList<Integer, DepositData> depositDataList = ReadList.wrap( deposits.stream().map(Deposit::getData).collect(Collectors.toList()), Integer::new, 1L << spec.getConstants().getDepositContractTreeDepth().getIntValue()); Eth1Data eth1Data = new Eth1Data( spec.hash_tree_root(depositDataList), UInt64.ZERO, Hash32.random(rnd)); InitialStateTransition initialStateTransition = new InitialStateTransition( new ChainStart(eth1Time, eth1Data, Collections.emptyList()), spec); BeaconState initialState = initialStateTransition.apply(spec.get_empty_block()); Time expectedTime = Time.castFrom( eth1Time .minus(eth1Time.modulo(spec.getConstants().getSecondsPerDay()))) .plus(spec.getConstants().getSecondsPerDay().times(2)); assertThat(initialState.getGenesisTime()).isEqualTo(expectedTime); assertThat(initialState.getEth1Data()).isEqualTo(eth1Data); }