@SuppressFBWarnings(value = "NP", justification = "Converter may be passed a null") @Test public void testConvertNull() { assertNull(underTest.convert(null)); }
public CloudCredential convert(Credential credential) { if (credential == null) { return null; } Map<String, Object> fields = isEmpty(credential.getAttributes()) ? new HashMap<>() : new Json(credential.getAttributes()).getMap(); return new CloudCredential(credential.getCrn(), credential.getName(), fields, false); }
CredentialToCloudCredentialConverter implements Converter<Credential, CloudCredential> { public CloudCredential convert(Credential credential) { if (credential == null) { return null; } Map<String, Object> fields = isEmpty(credential.getAttributes()) ? new HashMap<>() : new Json(credential.getAttributes()).getMap(); return new CloudCredential(credential.getCrn(), credential.getName(), fields, false); } }
CredentialToCloudCredentialConverter implements Converter<Credential, CloudCredential> { public CloudCredential convert(Credential credential) { if (credential == null) { return null; } Map<String, Object> fields = isEmpty(credential.getAttributes()) ? new HashMap<>() : new Json(credential.getAttributes()).getMap(); return new CloudCredential(credential.getCrn(), credential.getName(), fields, false); }  }
CredentialToCloudCredentialConverter implements Converter<Credential, CloudCredential> { public CloudCredential convert(Credential credential) { if (credential == null) { return null; } Map<String, Object> fields = isEmpty(credential.getAttributes()) ? new HashMap<>() : new Json(credential.getAttributes()).getMap(); return new CloudCredential(credential.getCrn(), credential.getName(), fields, false); }  CloudCredential convert(Credential credential); }
CredentialToCloudCredentialConverter implements Converter<Credential, CloudCredential> { public CloudCredential convert(Credential credential) { if (credential == null) { return null; } Map<String, Object> fields = isEmpty(credential.getAttributes()) ? new HashMap<>() : new Json(credential.getAttributes()).getMap(); return new CloudCredential(credential.getCrn(), credential.getName(), fields, false); }  CloudCredential convert(Credential credential);  }