@Test
public void testGetCurrentValue() throws Exception {

  // Create Json objects from text values.
  JsonParser jsonParser = new JsonParser();
  JsonObject json1 = (JsonObject) jsonParser.parse(value1.toString());
  JsonObject json2 = (JsonObject) jsonParser.parse(value2.toString());
  // Load RecordReader with multiple records. Set length of input split to 60 chars.
  GsonRecordReader multipleRecordReader = getRecordReader(60);
  // Assert RecordReader returns correct Json values.
  assertThat(multipleRecordReader.nextKeyValue()).isTrue();
  assertThat(multipleRecordReader.getCurrentValue()).isEqualTo(json1);
  assertThat(multipleRecordReader.nextKeyValue()).isTrue();
  assertThat(multipleRecordReader.getCurrentValue()).isEqualTo(json2);
  assertThat(multipleRecordReader.nextKeyValue()).isFalse();
  assertThat(multipleRecordReader.getCurrentValue()).isEqualTo(json2);
  // Close RecordReader.
  multipleRecordReader.close();
}