InstanceV2 extends Instance { @Override public int byteSize() { return INSTANCE_LENGTH; } InstanceV2(InstanceDomain domain, String name, int id, PcpString nameAsString); @Override void writeToMmv(ByteBuffer byteBuffer); @Override int byteSize();  }
@Test public void byteSizeShouldReturnTheSizeOfTheOnDiskFormat() { InstanceV2 instanceV2 = new InstanceV2(mock(InstanceDomain.class), INSTANCE_NAME, INSTANCE_DOMAIN_ID, mock(PcpString.class)); assertThat(instanceV2.byteSize(), is(EXPECTED_BYTE_SIZE)); }