### Question:
Batch implements IBatch { public float getProgressStatus() { if (monitor == null || monitor.getTotalWork() == IBatchProgressMonitor.UNKNOW || monitor.getTotalWork() == 0) { return IBatchProgressMonitor.UNKNOW; } return monitor.getProgress() * 100f / monitor.getTotalWork(); } 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 testGetProgressStatus() { Batch batch = new Batch("12345"); assertThat(batch.getProgressStatus(), is(equalTo(-1f))); InProcessBatchProgressMonitor mockedProgressMonitor = mock(InProcessBatchProgressMonitor.class); batch.setProgressMonitor(mockedProgressMonitor); when(mockedProgressMonitor.getTotalWork()).thenReturn(IBatchProgressMonitor.UNKNOW); assertThat(batch.getProgressStatus(), is(equalTo((float) IBatchProgressMonitor.UNKNOW))); when(mockedProgressMonitor.getTotalWork()).thenReturn(0); assertThat(batch.getProgressStatus(), is(equalTo((float) IBatchProgressMonitor.UNKNOW))); when(mockedProgressMonitor.getTotalWork()).thenReturn(5); when(mockedProgressMonitor.getProgress()).thenReturn(0f); assertThat(batch.getProgressStatus(), is(equalTo(0f))); when(mockedProgressMonitor.getTotalWork()).thenReturn(5); when(mockedProgressMonitor.getProgress()).thenReturn(0.305f); assertThat(batch.getProgressStatus(), is(equalTo(6.1f))); }