SerializationException {
RepositoryPackageOperations localRepositoryPackageOperations = initSpyingOnRealRepositoryPackageOperations();
final String packageName = "packageName";
PackageItem packageItem = mock( PackageItem.class );
when( this.rulesRepository.loadPackage( packageName ) ).thenReturn( packageItem );
PackageDRLAssembler contentPackageAssembler = mock( PackageDRLAssembler.class );
doReturn( contentPackageAssembler ).when( localRepositoryPackageOperations ).createPackageDRLAssembler(packageItem);
//doNothing().when( localRepositoryPackageOperations ).parseRulesToPackageList( contentPackageAssembler, new ArrayList<String>() );
when( contentPackageAssembler.getDRL() ).thenReturn( null );
assertArrayEquals( localRepositoryPackageOperations.listRulesInPackage( packageName ),
new String[]{} );
verify( localRepositoryPackageOperations,
never() ).parseRulesToPackageList( Mockito.any( PackageDRLAssembler.class ),
Mockito.anyList() );