src/test/java/edu/ucla/library/bucketeer/ImageLoadUsingKakaduIT.java
@Test
    public void testMissingTiffImageLoad(final TestContext aContext) {
        Assume.assumeNotNull(System.getProperty(TestConstants.BUCKETEER_VERSION));

        final String imagePath = URLEncoder.encode("MISSING_IMAGE", StandardCharsets.UTF_8);
        final String path = StringUtils.format(PATH, myImageID, imagePath);
        final WebClient webClient = WebClient.create(myVertx);
        final Async asyncTask = aContext.async();

        webClient.get(myPort, Constants.UNSPECIFIED_HOST, path).expect(ResponsePredicate.SC_NOT_FOUND).send(test -> {
            if (test.succeeded()) {
                TestUtils.complete(asyncTask);
            } else {
                aContext.fail(test.cause());
            }
        });
    }
/**
     * Tests to make sure that a missing image throws a 404.
     *
     * @param aContext A test context
     */
Tests to make sure that a missing image throws a 404.
@param aContext A test context
Tests to make sure that a missing image throws a 404 . @param aContext A test context
@Test
    public void testMissingTiffImageLoad(final TestContext aContext) {
        Assume.assumeNotNull(System.getProperty(TestConstants.BUCKETEER_VERSION));
        final String imagePath = URLEncoder.encode("MISSING_IMAGE", StandardCharsets.UTF_8);
        final String path = StringUtils.format(PATH, myImageID, imagePath);
        final WebClient webClient = WebClient.create(myVertx);
        final Async asyncTask = aContext.async();
        webClient.get(myPort, Constants.UNSPECIFIED_HOST, path).expect(ResponsePredicate.SC_NOT_FOUND).send(test -> {
            if (test.succeeded()) {
                TestUtils.complete(asyncTask);
            } else {
                aContext.fail(test.cause());
            }
        });
    }
@ Test public void testMissingTiffImageLoad ( final TestContext aContext ) { Assume . assumeNotNull ( System . getProperty ( TestConstants . BUCKETEER_VERSION ) ) ; final String imagePath = URLEncoder . encode ( "MISSING_IMAGE" , StandardCharsets . UTF_8 ) ; final String path = StringUtils . format ( PATH , myImageID , imagePath ) ; final WebClient webClient = WebClient . create ( myVertx ) ; final Async asyncTask = aContext . async ( ) ; webClient . get ( myPort , Constants . UNSPECIFIED_HOST , path ) . expect ( ResponsePredicate . SC_NOT_FOUND ) . send ( test -> { if ( test . succeeded ( ) ) { TestUtils . complete ( asyncTask ) ; } else { aContext . fail ( test . cause ( ) ) ; } } ) ; }
Tests to make sure that a missing image throws a 404.
Tests to make sure that a missing image throws a 404 .