assertThat(oAuthConsumerStoreConverter.convert(oAuthConsumerStore), is(nullValue()));
}
@Test
public void newOAuthConsumerStore() {
OAuthConsumerStore oAuthConsumerStore = new OAuthConsumerStoreImpl();
oAuthConsumerStore.setId("1");
oAuthConsumerStore.setServiceName("servicename");
oAuthConsumerStore.setCallbackUrl("callbackurl");
oAuthConsumerStore.setConsumerKey("key");
oAuthConsumerStore.setConsumerSecret("secret");
oAuthConsumerStore.setGadgetUri("gadgeturi");
oAuthConsumerStore.setKeyName("key");
oAuthConsumerStore.setKeyType(OAuthConsumerStore.KeyType.HMAC_SYMMETRIC);
JpaOAuthConsumerStore converted = oAuthConsumerStoreConverter.convert(oAuthConsumerStore);
assertThat(converted, is(not(sameInstance(oAuthConsumerStore))));
assertThat(converted, is(instanceOf(JpaOAuthConsumerStore.class)));
assertThat(converted.getId(), is(equalTo(oAuthConsumerStore.getId())));
assertThat(converted.getServiceName(), is(equalTo(oAuthConsumerStore.getServiceName())));
assertThat(converted.getCallbackUrl(), is(equalTo(oAuthConsumerStore.getCallbackUrl())));
assertThat(converted.getConsumerKey(), is(equalTo(oAuthConsumerStore.getConsumerKey())));
assertThat(converted.getConsumerSecret(), is(equalTo(oAuthConsumerStore.getConsumerSecret())));
assertThat(converted.getEntityId().toString(), is(equalTo(oAuthConsumerStore.getId())));
assertThat(converted.getGadgetUri(), is(equalTo(oAuthConsumerStore.getGadgetUri())));
assertThat(converted.getKeyName(), is(equalTo(oAuthConsumerStore.getKeyName())));
assertThat(converted.getKeyType(), is(equalTo(oAuthConsumerStore.getKeyType())));
}