### Question:
SnapshotKey implements Serializable { public static Builder builder() { return new Builder(); } private  SnapshotKey(SyncKey syncKey, DeviceId deviceId, CollectionId collectionId); static Builder builder(); SyncKey getSyncKey(); DeviceId getDeviceId(); CollectionId getCollectionId(); @Override final int hashCode(); @Override final boolean equals(Object object); @Override String toString();  }### Answer:
@Test (expected=IllegalArgumentException.class) public void testNullSyncKey() { SnapshotKey.builder() .deviceId(new DeviceId("deviceId")) .collectionId(CollectionId.of(1)) .build(); }
@Test (expected=IllegalArgumentException.class) public void testNullDeviceId() { SnapshotKey.builder() .syncKey(new SyncKey("syncKey")) .collectionId(CollectionId.of(1)) .build(); }
@Test (expected=IllegalArgumentException.class) public void testNullCollectionId() { SnapshotKey.builder() .deviceId(new DeviceId("deviceId")) .syncKey(new SyncKey("syncKey")) .build(); }
@Test public void testBuilder() { SyncKey syncKey = new SyncKey("synckey"); DeviceId deviceId = new DeviceId("deviceId"); CollectionId collectionId = CollectionId.of(1); SnapshotKey snapshotKey = SnapshotKey.builder() .deviceId(deviceId) .syncKey(syncKey) .collectionId(collectionId) .build(); assertThat(snapshotKey.getSyncKey()).isEqualTo(syncKey); assertThat(snapshotKey.getDeviceId()).isEqualTo(deviceId); assertThat(snapshotKey.getCollectionId()).isEqualTo(collectionId); }