use of uk.gov.gchq.gaffer.operation.impl.export.resultcache.GetGafferResultCacheExport in project Gaffer by gchq.
the class GetGafferResultCacheExportTest method shouldJSONSerialiseAndDeserialise.
@Test
public void shouldJSONSerialiseAndDeserialise() throws SerialisationException {
// Given
final String key = "key";
final GetGafferResultCacheExport op = new GetGafferResultCacheExport.Builder().key(key).build();
// When
byte[] json = JSONSerialiser.serialise(op, true);
final GetGafferResultCacheExport deserialisedOp = JSONSerialiser.deserialise(json, GetGafferResultCacheExport.class);
// Then
assertEquals(key, deserialisedOp.getKey());
}
use of uk.gov.gchq.gaffer.operation.impl.export.resultcache.GetGafferResultCacheExport in project Gaffer by gchq.
the class GetGafferResultCacheExportTest method shouldShallowCloneOperation.
@Test
@Override
public void shouldShallowCloneOperation() {
// Given
final String key = "key";
final String jobId = "jobId";
final GetGafferResultCacheExport getGafferResultCacheExport = new GetGafferResultCacheExport.Builder().key(key).jobId(jobId).build();
// When
GetGafferResultCacheExport clone = getGafferResultCacheExport.shallowClone();
// Then
assertNotSame(getGafferResultCacheExport, clone);
assertEquals(key, clone.getKey());
assertEquals(jobId, clone.getJobId());
}
Aggregations