LeaseAcquirerServerService implements EntityServerService<LeaseMessage, LeaseResponse> { @Override public MessageCodec<LeaseMessage, LeaseResponse> getMessageCodec() { return new LeaseAcquirerCodec(); }  @Override long getVersion(); @Override boolean handlesEntityType(String typeName); @SuppressWarnings("unchecked") @Override ActiveServerEntity<LeaseMessage, LeaseResponse> createActiveEntity(ServiceRegistry serviceRegistry, byte[] bytes); @Override PassiveServerEntity<LeaseMessage, LeaseResponse> createPassiveEntity(ServiceRegistry serviceRegistry, byte[] bytes); @Override ConcurrencyStrategy<LeaseMessage> getConcurrencyStrategy(byte[] bytes); @Override MessageCodec<LeaseMessage, LeaseResponse> getMessageCodec(); @Override SyncMessageCodec<LeaseMessage> getSyncMessageCodec();  }
@Test public void codec() { LeaseAcquirerServerService serverService = new LeaseAcquirerServerService(); assertEquals(LeaseAcquirerCodec.class, serverService.getMessageCodec().getClass()); }