### Question:
X509Svid { public static X509Svid load(@NonNull final Path certsFilePath, @NonNull final Path privateKeyFilePath) throws X509SvidException { final byte[] certsBytes; try { certsBytes = Files.readAllBytes(certsFilePath); } catch (IOException e) { throw new X509SvidException("Cannot read certificate file", e); } final byte[] privateKeyBytes; try { privateKeyBytes = Files.readAllBytes(privateKeyFilePath); } catch (IOException e) { throw new X509SvidException("Cannot read private key file", e); } return createX509Svid(certsBytes, privateKeyBytes, KeyFileFormat.PEM); } private  X509Svid(
            final SpiffeId spiffeId,
            final List<X509Certificate> chain,
            final PrivateKey privateKey); X509Certificate getLeaf(); List<X509Certificate> getChain(); static X509Svid load(@NonNull final Path certsFilePath, @NonNull final Path privateKeyFilePath); static X509Svid parse(@NonNull final byte[] certsBytes, @NonNull final byte[] privateKeyBytes); static X509Svid parseRaw(@NonNull final byte[] certsBytes,
                                    @NonNull final byte[] privateKeyBytes); X509Certificate[] getChainArray();  }### Answer:
@Test void testLoad_FailsCannotReadCertFile() throws URISyntaxException { Path keyPath = Paths.get(toUri(keyRSA)); try { X509Svid.load(Paths.get("not-existent-cert"), keyPath); fail("should have thrown IOException"); } catch (X509SvidException e) { assertEquals("Cannot read certificate file", e.getMessage()); } }
@Test void testLoad_FailsCannotReadKeyFile() throws URISyntaxException { Path certPath = Paths.get(toUri(certSingle)); try { X509Svid.load(certPath, Paths.get("not-existent-key")); fail("should have thrown IOException"); } catch (X509SvidException e) { assertEquals("Cannot read private key file", e.getMessage()); } }
@Test void testLoad_nullCertFilePath_throwsNullPointerException() throws URISyntaxException { try { X509Svid.load(null, Paths.get(toUri(keyRSA))); fail("should have thrown exception"); } catch (NullPointerException | X509SvidException e) { assertEquals("certsFilePath is marked non-null but is null", e.getMessage()); } }
@Test void testLoad_nullKeyFilePath_throwsNullPointerException() throws URISyntaxException, X509SvidException { try { X509Svid.load(Paths.get(toUri(certSingle)), null); fail("should have thrown exception"); } catch (NullPointerException e) { assertEquals("privateKeyFilePath is marked non-null but is null", e.getMessage()); } }