@Override
    protected License open(final Local file) {
        // Verify immediately and exit if not a valid receipt
        final ReceiptVerifier verifier = new ReceiptVerifier(file);
        if(verifier.verify(new DisabledLicenseVerifierCallback())) {
            // Set name
            final Receipt receipt = new Receipt(file, verifier.getGuid());
            if(log.isInfoEnabled()) {
                log.info(String.format("Valid receipt %s in %s", receipt, file));
            }
            // Copy to Application Support for users switching versions
            final Local support = SupportDirectoryFinderFactory.get().find();
            try {
                file.copy(LocalFactory.get(support, String.format("%s.cyberduckreceipt",
                        PreferencesFactory.get().getProperty("application.name"))));
            }
            catch(AccessDeniedException e) {
                log.warn(e.getMessage());
            }
            return receipt;
        }
        else {
            log.error(String.format("Invalid receipt found in %s", file));
            System.exit(APPSTORE_VALIDATION_FAILURE);
            return null;
        }
    }
@Test
    public void testOpenDirectory() throws Exception {
        assertEquals(1, new ReceiptFactory(new Local("/Applications/Cyberduck.app/Contents/_MASReceipt")).open().size());
    }