### Question:
JpaApplicationDataRepository implements ApplicationDataRepository { @Override public List<ApplicationData> getApplicationData(List<String> userIds, String appId) { if (userIds.size() == 1) { List<ApplicationData> data = new ArrayList<ApplicationData>(); ApplicationData applicationData = getApplicationData(userIds.get(0), appId); if (applicationData != null) { data.add(applicationData); } return data; } TypedQuery<JpaSerializableApplicationData> query = manager.createNamedQuery(JpaApplicationData.FIND_BY_USER_IDS_AND_APP_ID, JpaSerializableApplicationData.class); query.setParameter(JpaApplicationData.USER_IDS_PARAM, userIds); query.setParameter(JpaApplicationData.APP_URL_PARAM, appId); List<JpaSerializableApplicationData> results = query.getResultList(); for (JpaSerializableApplicationData applicationData : results) { applicationData.deserializeData(); } return CollectionUtils.<ApplicationData>toBaseTypedList(results); }  @Override Class<? extends ApplicationData> getType(); @Override ApplicationData get(String id); @Override @Transactional JpaApplicationData save(ApplicationData item); @Override void delete(ApplicationData item); @Override List<ApplicationData> getAll(); @Override List<ApplicationData> getLimitedList(int offset, int limit); @Override int getCountAll(); @Override List<ApplicationData> getApplicationData(List<String> userIds, String appId); @Override JpaApplicationData getApplicationData(String personId, String appId);  }### Answer:
@Test public void getApplicationData_byUserIdAndApplicationId_valid() { JpaApplicationData applicationData = (JpaApplicationData) repository.getApplicationData(VALID_USER_ID, VALID_APPLICATION_ID); validateApplicationData(applicationData); }
@Test public void getApplicationData_byUserIdAndApplicationId_invalid() { ApplicationData applicationData = repository.getApplicationData("-1", VALID_APPLICATION_ID); assertThat(applicationData, is(nullValue())); }
@Test public void getApplicationData_byUserIdsAndApplicationId_invalid() { List<ApplicationData> applicationData = repository.getApplicationData(Arrays.asList("-1"), VALID_APPLICATION_ID); assertThat(applicationData, not(nullValue())); assertThat(applicationData.size(), is(equalTo(0))); }