### Question:
JpaOAuthConsumerStoreRepository implements OAuthConsumerStoreRepository { @Override public OAuthConsumerStore findByUriAndServiceName(String gadgetUri, String serviceName) { TypedQuery<JpaOAuthConsumerStore> query = manager.createNamedQuery( JpaOAuthConsumerStore.FIND_BY_URI_AND_SERVICE_NAME, JpaOAuthConsumerStore.class); query.setParameter(JpaOAuthConsumerStore.GADGET_URI_PARAM, gadgetUri); query.setParameter(JpaOAuthConsumerStore.SERVICE_NAME_PARAM, serviceName); return getSingleResult(query.getResultList()); }  @Override Class<? extends OAuthConsumerStore> getType(); @Override OAuthConsumerStore get(String id); @Override OAuthConsumerStore save(OAuthConsumerStore item); @Override void delete(OAuthConsumerStore item); @Override List<OAuthConsumerStore> getAll(); @Override List<OAuthConsumerStore> getLimitedList(int offset, int limit); @Override int getCountAll(); @Override OAuthConsumerStore findByUriAndServiceName(String gadgetUri, String serviceName);  }### Answer:
@Test public void testFindByUriAndServiceName() throws Exception { final OAuthConsumerStore store = repository.findByUriAndServiceName(GADGET_URI, SERVICE_NAME_GOOGLE); assertNotNull("OAuthConsumerStore In test db", store); assertEquals("gadgetSecret", store.getConsumerSecret()); assertEquals(JpaOAuthConsumerStore.KeyType.HMAC_SYMMETRIC, store.getKeyType()); }
@Test public void testFindByUriAndServiceName_nullValue() throws Exception { final OAuthConsumerStore store = repository.findByUriAndServiceName(GADGET_URI, SERVICE_NAME_FOO); assertNull(store); }