### Question:
NodeDiskManager { @Transactional public NodeDisk register(final String nodeId, final DiskRegistrationRequest request) { return register(nodeId, Collections.singletonList(request)).get(0); }  @Transactional NodeDisk register(final String nodeId, final DiskRegistrationRequest request); @Transactional List<NodeDisk> register(final String nodeId, final List<DiskRegistrationRequest> requests); @Transactional List<NodeDisk> register(final String nodeId, final LocalDateTime creationDate,
                                   final List<DiskRegistrationRequest> requests); List<NodeDisk> loadByNodeId(final String nodeId);  }### Answer:
@Test public void insertShouldFailOnMissingDiskSize() { assertThrows(IllegalArgumentException.class, () -> register(NODE_ID, request(NULL_SIZE))); }
@Test public void insertShouldFailOnZeroDiskSize() { assertThrows(IllegalArgumentException.class, () -> register(NODE_ID, request(ZERO_SIZE))); }
@Test public void insertShouldFailOnNegativeDiskSize() { assertThrows(IllegalArgumentException.class, () -> register(NODE_ID, request(NEGATIVE_SIZE))); }
@Test public void insertShouldFailOnMissingNodeId() { assertThrows(IllegalArgumentException.class, () -> register(NULL_NODE_ID, request(SIZE))); }
@Test public void insertShouldFailOnMissingCreationDateIfSpecified() { assertThrows(IllegalArgumentException.class, () -> register(NULL_NODE_ID, NULL_CREATION_DATE, request(SIZE))); }
@Test public void insertShouldSaveDisk() { register(NODE_ID, request(SIZE)); verify(nodeDiskDao).insert(eq(NODE_ID), eq(Collections.singletonList(request(SIZE)))); }
@Test public void insertShouldSaveDiskIfCreationDateIsSpecified() { register(NODE_ID, CREATION_DATE, request(SIZE)); verify(nodeDiskDao).insert(eq(NODE_ID), eq(CREATION_DATE), eq(Collections.singletonList(request(SIZE)))); }
@Test public void insertShouldReturnSavedDisk() { final NodeDisk actualDisk = register(NODE_ID, request(SIZE)); assertThat(actualDisk, is(disk())); }