VariableSizeWriter writer = new VariableSizeWriter(new FileWriter(testFile), 1000);
writer.writeString(response.getCode(), CODE_LENGTH);
writer.writeString(line_separator, line_separator.length());
writer.writeNumeric(response.getVersion(), VERSION_LENGTH);
writer.writeString(line_separator, line_separator.length());
if (response.getGroupField() == null) {
writer.writeNumeric(RESPONSE_CODE_LENGTH + response.getFieldsLength(), DATA_LENGTH_LENGTH);
} else {
int hasMoreEntriesSize = response.getHasMoreEntriesFlag() ? MORE_ENTRIES_FLAG_LENGTH : 0;
writer.writeNumeric(RESPONSE_CODE_LENGTH +