DDMFormInstanceRecordXLSWriter implements DDMFormInstanceRecordWriter { protected CellStyle createCellStyle( Workbook workbook, boolean bold, String fontName, short heightInPoints) { Font font = workbook.createFont(); font.setBold(bold); font.setFontHeightInPoints(heightInPoints); font.setFontName(fontName); CellStyle style = workbook.createCellStyle(); style.setFont(font); return style; }  @Override DDMFormInstanceRecordWriterResponse write(
			DDMFormInstanceRecordWriterRequest
				ddmFormInstanceRecordWriterRequest);  }
@Test public void testCreateCellStyle() { DDMFormInstanceRecordXLSWriter ddmFormInstanceRecordXLSWriter = new DDMFormInstanceRecordXLSWriter(); Workbook workbook = mock(Workbook.class); Font font = mock(Font.class); when( workbook.createFont() ).thenReturn( font ); CellStyle cellStyle = mock(CellStyle.class); when( workbook.createCellStyle() ).thenReturn( cellStyle ); ddmFormInstanceRecordXLSWriter.createCellStyle( workbook, false, "Courier New", (short)12); InOrder inOrder = Mockito.inOrder(workbook, font, cellStyle); inOrder.verify( workbook, Mockito.times(1) ).createFont(); inOrder.verify( font, Mockito.times(1) ).setBold( false ); inOrder.verify( font, Mockito.times(1) ).setFontHeightInPoints( (short)12 ); inOrder.verify( font, Mockito.times(1) ).setFontName( "Courier New" ); inOrder.verify( workbook, Mockito.times(1) ).createCellStyle(); inOrder.verify( cellStyle, Mockito.times(1) ).setFont( font ); }