@Test
public void testCountXAssets() {

	RangerService rangerService1 = rangerService(Id);
	RangerService rangerService2 = rangerService(9L);
	VXAsset vXAsset1 = vXAsset(Id);
	VXAsset vXAsset2 = vXAsset(9L);
	VXAssetList expectedVXAsset = new VXAssetList();
	List<VXAsset> vXAsset = Arrays.asList(vXAsset1, vXAsset2);
	expectedVXAsset.setVXAssets(vXAsset);
	VXLong expectedAsset = new VXLong();
	expectedAsset.setValue(2l);
	List<RangerService> services = Arrays.asList(rangerService1, rangerService2);
	SearchFilter searchFilter = new SearchFilter();
	Mockito.when(searchUtil.getSearchFilterFromLegacyRequestForRepositorySearch(request, null))
			.thenReturn(searchFilter);
	Mockito.when(serviceREST.getServices(searchFilter)).thenReturn(services);
	Mockito.when(serviceUtil.toVXAsset(rangerService1)).thenReturn(vXAsset1);
	Mockito.when(serviceUtil.toVXAsset(rangerService2)).thenReturn(vXAsset2);
	VXLong actualAsset = assetREST.countXAssets(request);
	Assert.assertEquals(expectedAsset.getValue(), actualAsset.getValue());
}