### Question:
AssetGroupServiceImpl implements AssetGroupService { @Override public AssetGroupDetails findByGroupName(String groupName) { return assetGroupRepository.findByGroupName(groupName); }  @Override Collection<String> getAllAssetGroupNames(); @Override Page<AssetGroupView> getAllAssetGroupDetails(final String searchTerm, final int page, final int size); @Override AssetGroupDetails findByGroupName(String groupName); @SuppressWarnings("unchecked") @Override String updateAssetGroupDetails(final CreateUpdateAssetGroupDetails updateAssetGroupDetails, final String userId); @Override String createAssetGroupDetails(final CreateUpdateAssetGroupDetails createAssetGroupDetails, final String userId); @Override UpdateAssetGroupDetails getAssetGroupDetailsByIdAndDataSource(final String assetGroupId, final String dataSource); @Override String deleteAssetGroup(final DeleteAssetGroupRequest assetGroupDetails, final String userId);  }### Answer:
@Test public void findByGroupNameTest() { when(assetGroupRepository.findByGroupName(anyString())).thenReturn(getAssetGroupDetails()); assertThat(assetGroupService.findByGroupName(StringUtils.EMPTY), is(notNullValue())); }