### Question:
Batch implements IBatch { public String getCurrentItem() { if (monitor == null) { return null; } Object currentItem = monitor.getCurrentItem(); if (currentItem == null) { return null; } return currentItem.toString(); } Batch(String uuid);  Batch(String uuid, String name, String group); @Override boolean equals(Object obj); String getCurrentItem(); String getCurrentTask(); Date getEndDate(); String getGroup(); long getItemCount(); String getLastMessage(); Date getLastUpdate(); String getName(); IBatchProgressMonitor getProgressMonitor(); float getProgressStatus(); List<String> getRejectedItemsId(); Date getStartDate(); String getStatus(); String getUuid(); boolean isSuccess(); void setProgressMonitor(IBatchProgressMonitor monitor); void setZombieInterval(int zombieInterval);  }### Answer:
@Test public void testGetCurrentItem() { assertNull(new Batch("12345", "batchName", "batchGroup").getCurrentItem()); Batch batch = new Batch("12345"); assertNull(batch.getCurrentItem()); InProcessBatchProgressMonitor mockedProgressMonitor = mock(InProcessBatchProgressMonitor.class); batch.setProgressMonitor(mockedProgressMonitor); when(mockedProgressMonitor.getCurrentItem()).thenReturn(null); assertNull(batch.getCurrentItem()); when(mockedProgressMonitor.getCurrentItem()).thenReturn(new String("current item")); assertThat(batch.getCurrentItem(), is("current item")); }