### Question:
WriterService { public String getAccessorName(DBColumn column) { return deriveAccessorName(column.getName(), getJavaType(column)); } WriterService(CodeGenConfig config); String getTableName(DBTable t); String getViewName(DBView v); String getRowsetName(DBRowSet r); String getColumnName(DBColumn c); String getTableClassName(String tableName); String getViewClassName(String viewName); String getRecordClassName(String tableName); String getAccessorName(DBColumn column); String getMutatorName(DBColumn column); boolean hasBigDecimalField(DBTable table); boolean hasDateField(DBTable table); boolean hasLockingColumn(DBTable table); Class<?> getJavaType(DBColumn column); DataType getDataType(DBColumn c);  }### Answer:
@Test public void testGetAccessorName(){ CodeGenConfig config = new CodeGenConfig(); WriterService service = new WriterService(config); DBTableColumn col = Mockito.mock(DBTableColumn.class); Mockito.when(col.getDataType()).thenReturn(DataType.INTEGER); Mockito.when(col.getName()).thenReturn("name"); assertEquals("getName",service.getAccessorName(col)); DBTableColumn col2 = Mockito.mock(DBTableColumn.class); Mockito.when(col2.getDataType()).thenReturn(DataType.BOOL); Mockito.when(col2.getName()).thenReturn("name"); assertEquals("isName",service.getAccessorName(col2)); }