@Test
public void testApply() throws Exception {
WindowsLoginCredentialsFromEncryptedData f = new WindowsLoginCredentialsFromEncryptedData(new JCECrypto());
LoginCredentials credentials = f.apply(new EncryptedPasswordAndPrivateKey(ENCRYPTED_PASSWORD, PRIVATE_KEY));
assertEquals(credentials.getUser(), "Administrator");
assertEquals(credentials.getOptionalPassword().get(), "u4.y9mb;nR.");
assertFalse(credentials.getOptionalPrivateKey().isPresent());
}