@Test
public void testSingleImageSparkTransform() throws Exception {

    int seed = 12345;
    File f1 = new ClassPathResource("/testimages/class1/A.jpg").getFile();
    SingleImageRecord imgRecord = new SingleImageRecord(f1.toURI());
    ImageTransformProcess imgTransformProcess = new ImageTransformProcess.Builder().seed(seed)
                    .scaleImageTransform(10).cropImageTransform(5).build();
    ImageSparkTransform imgSparkTransform = new ImageSparkTransform(imgTransformProcess);
    Base64NDArrayBody body = imgSparkTransform.toArray(imgRecord);
    INDArray fromBase64 = Nd4jBase64.fromBase64(body.getNdarray());
    System.out.println("Base 64ed array " + fromBase64);
    assertEquals(1, fromBase64.size(0));
}