input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testSafetyNetClose ( ) { setup ( 20 ) ; startThreads ( ) ; joinThreads ( ) ; for ( int i = 0 ; ( i < 5 ) && ( ( unclosedCounter . get ( ) ) > 0 ) ; ++ i ) { java . lang . System . gc ( ) ; java . lang . Thread . sleep ( 50 ) ; } "<AssertPlaceHolder>" ; closeableRegistry . close ( ) ; } get ( ) { return delegate . get ( ) ; }
org . junit . Assert . assertEquals ( 0 , unclosedCounter . get ( ) )
testOneWayTestEqualVars ( ) { logger . info ( "oneWayTestEqualVars" ) ; com . datumbox . framework . common . dataobjects . TransposeDataCollection transposeDataCollection = new com . datumbox . framework . common . dataobjects . TransposeDataCollection ( ) ; transposeDataCollection . put ( 0 , new com . datumbox . framework . common . dataobjects . FlatDataCollection ( java . util . Arrays . asList ( new java . lang . Object [ ] { 86 , 79 , 81 , 70 , 84 } ) ) ) ; transposeDataCollection . put ( 1 , new com . datumbox . framework . common . dataobjects . FlatDataCollection ( java . util . Arrays . asList ( new java . lang . Object [ ] { 90 , 76 , 88 , 82 , 89 } ) ) ) ; transposeDataCollection . put ( 2 , new com . datumbox . framework . common . dataobjects . FlatDataCollection ( java . util . Arrays . asList ( new java . lang . Object [ ] { 82 , 68 , 73 , 71 , 81 } ) ) ) ; double aLevel = 0.05 ; com . datumbox . framework . common . dataobjects . AssociativeArray2D outputTable = new com . datumbox . framework . common . dataobjects . AssociativeArray2D ( ) ; boolean expResult = false ; boolean result = com . datumbox . framework . core . statistics . anova . Anova . oneWayTestEqualVars ( transposeDataCollection , aLevel , outputTable ) ; "<AssertPlaceHolder>" ; } oneWayTestEqualVars ( com . datumbox . framework . common . dataobjects . TransposeDataCollection , double , com . datumbox . framework . common . dataobjects . AssociativeArray2D ) { int n = 0 ; int k = transposeDataCollection . size ( ) ; if ( k <= 1 ) { throw new java . lang . IllegalArgumentException ( "The<sp>collection<sp>must<sp>contain<sp>observations<sp>from<sp>at<sp>least<sp>2<sp>groups." ) ; } java . util . Map < java . lang . Object , java . lang . Integer > nj = new java . util . HashMap ( ) ; double Ymean = 0.0 ; java . util . Map < java . lang . Object , java . lang . Double > Yjmean = new java . util . HashMap ( ) ; for ( Map . Entry < java . lang . Object , com . datumbox . framework . common . dataobjects . FlatDataCollection > entry : transposeDataCollection . entrySet ( ) ) { java . lang . Object j = entry . getKey ( ) ; com . datumbox . framework . common . dataobjects . FlatDataCollection flatDataCollection = entry . getValue ( ) ; int m = flatDataCollection . size ( ) ; if ( m == 0 ) { throw new java . lang . IllegalArgumentException ( "The<sp>number<sp>of<sp>observations<sp>in<sp>each<sp>group<sp>but<sp>be<sp>larger<sp>than<sp>0." ) ; } nj . put ( j , m ) ; n += m ; double sum = com . datumbox . framework . core . statistics . descriptivestatistics . Descriptives . sum ( flatDataCollection ) ; Yjmean . put ( j , ( sum / m ) ) ; Ymean += sum ; } if ( ( n - k ) <= 0 ) { throw new java . lang . IllegalArgumentException ( "The<sp>number<sp>of<sp>observations<sp>must<sp>be<sp>larger<sp>than<sp>the<sp>number<sp>of<sp>groups." ) ; } Ymean /= n ; double RSS = 0.0 ; double BSS = 0.0 ; for ( Map . Entry < java . lang . Object , com . datumbox . framework . common . dataobjects . FlatDataCollection > entry : transposeDataCollection . entrySet ( ) ) { java . lang . Object j = entry . getKey ( ) ; com . datumbox . framework . common . dataobjects . FlatDataCollection flatDataCollection = entry . getValue ( ) ; java . util . Iterator < java . lang . Double > it = flatDataCollection . iteratorDouble ( ) ; while ( it . hasNext ( ) ) { RSS += java . lang . Math . pow ( ( ( it . next ( ) ) - ( Yjmean . get ( j ) ) ) , 2 ) ; } BSS += ( nj . get ( j ) ) * ( java . lang . Math . pow ( ( ( Yjmean . get ( j ) ) - Ymean ) , 2 ) ) ; } double F = ( BSS / ( k - 1 ) ) / ( RSS / ( n - k ) ) ; double pvalue = com . datumbox . framework . core . statistics . distributions . ContinuousDistributions . fCdf ( F , ( k - 1 ) , ( n - k ) ) ; boolean rejectH0 = false ; double a = aLevel / 2 ; if ( ( pvalue <= a ) || ( pvalue >= ( 1 - a ) ) ) { rejectH0 = true ; } if ( outputTable != null ) { double TSS = RSS + BSS ; outputTable . clear ( ) ; outputTable . put2d ( "BG" , "SSq" , BSS ) ; outputTable . put2d ( "BG" , "DF" , ( k - 1 ) ) ; outputTable . put2d ( "BG" , "DF" 0 , ( BSS / ( k - 1 ) ) ) ; outputTable . put2d ( "BG" , "F" , F ) ; outputTable . put2d ( "BG" , "p" , ( 1 - pvalue ) ) ; outputTable . put2d ( "WG" , "SSq" , RSS ) ; outputTable . put2d ( "WG" , "DF" , ( n - k ) ) ; outputTable . put2d ( "WG" , "DF" 0 , ( RSS / ( n - k ) ) ) ; outputTable . put2d ( "R" , "SSq" , TSS ) ; outputTable . put2d ( "R" , "DF" , ( n - 1 ) ) ; } return rejectH0 ; }
org . junit . Assert . assertEquals ( expResult , result )
testGetFacetsResponseIncludingTagWithNoAssociatedBdefs ( ) { org . finra . herd . model . dto . ElasticsearchResponseDto elasticsearchResponseDto = new org . finra . herd . model . dto . ElasticsearchResponseDto ( ) ; java . util . List < org . finra . herd . model . dto . TagTypeIndexSearchResponseDto > nestTagTypeIndexSearchResponseDtos = new java . util . ArrayList ( ) ; org . finra . herd . model . dto . TagTypeIndexSearchResponseDto tagType1 = new org . finra . herd . model . dto . TagTypeIndexSearchResponseDto ( org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_TYPE_CODE , null , org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_TYPE_DISPLAY_NAME ) ; org . finra . herd . model . dto . TagTypeIndexSearchResponseDto tagType2 = new org . finra . herd . model . dto . TagTypeIndexSearchResponseDto ( org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_TYPE_CODE_2 , java . util . Collections . singletonList ( new org . finra . herd . model . dto . TagIndexSearchResponseDto ( org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_CODE , 1 , org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_CODE_DISPLAY_NAME ) ) , org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_TYPE_DISPLAY_NAME_2 ) ; nestTagTypeIndexSearchResponseDtos . add ( tagType1 ) ; nestTagTypeIndexSearchResponseDtos . add ( tagType2 ) ; elasticsearchResponseDto . setNestTagTypeIndexSearchResponseDtos ( nestTagTypeIndexSearchResponseDtos ) ; org . finra . herd . model . dto . TagTypeIndexSearchResponseDto tagType3 = new org . finra . herd . model . dto . TagTypeIndexSearchResponseDto ( org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_TYPE_CODE_2 , java . util . Collections . singletonList ( new org . finra . herd . model . dto . TagIndexSearchResponseDto ( org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_CODE_2 , 1 , org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_CODE_DISPLAY_NAME_2 ) ) , org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_TYPE_DISPLAY_NAME_2 ) ; java . util . List < org . finra . herd . model . dto . TagTypeIndexSearchResponseDto > tagTypeIndexSearchResponseDtos = new java . util . ArrayList ( ) ; tagTypeIndexSearchResponseDtos . add ( tagType3 ) ; elasticsearchResponseDto . setTagTypeIndexSearchResponseDtos ( tagTypeIndexSearchResponseDtos ) ; java . util . List < org . finra . herd . model . api . xml . Facet > facets = elasticsearchHelper . getFacetsResponse ( elasticsearchResponseDto , org . finra . herd . dao . helper . BUSINESS_OBJECT_DEFINITION_SEARCH_INDEX_NAME , org . finra . herd . dao . helper . TAG_SEARCH_INDEX_NAME ) ; java . util . List < org . finra . herd . model . api . xml . Facet > expectedFacets = new java . util . ArrayList ( ) ; expectedFacets . add ( new org . finra . herd . model . api . xml . Facet ( org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_TYPE_DISPLAY_NAME , null , FacetTypeEnum . TAG_TYPE . value ( ) , org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_TYPE_CODE , new java . util . ArrayList ( ) ) ) ; java . util . List < org . finra . herd . model . api . xml . Facet > tagFacet = new java . util . ArrayList ( ) ; tagFacet . add ( new org . finra . herd . model . api . xml . Facet ( org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_CODE_DISPLAY_NAME , 1L , FacetTypeEnum . TAG . value ( ) , org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_CODE , null ) ) ; tagFacet . add ( new org . finra . herd . model . api . xml . Facet ( org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_CODE_DISPLAY_NAME_2 , 1L , FacetTypeEnum . TAG . value ( ) , org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_CODE_2 , null ) ) ; expectedFacets . add ( new org . finra . herd . model . api . xml . Facet ( org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_TYPE_DISPLAY_NAME_2 , null , FacetTypeEnum . TAG_TYPE . value ( ) , org . finra . herd . dao . helper . ElasticSearchHelperTest . TAG_TYPE_CODE_2 , tagFacet ) ) ; "<AssertPlaceHolder>" ; } getFacetsResponse ( org . finra . herd . model . dto . ElasticsearchResponseDto , java . lang . String , java . lang . String ) { java . util . List < org . finra . herd . model . api . xml . Facet > facets = new java . util . ArrayList ( ) ; java . util . List < org . finra . herd . model . api . xml . Facet > tagTypeFacets ; if ( ( elasticsearchResponseDto . getNestTagTypeIndexSearchResponseDtos ( ) ) != null ) { tagTypeFacets = new java . util . ArrayList ( ) ; for ( org . finra . herd . model . dto . TagTypeIndexSearchResponseDto tagTypeIndexSearchResponseDto : elasticsearchResponseDto . getNestTagTypeIndexSearchResponseDtos ( ) ) { tagTypeFacets . add ( createTagTypeFacet ( tagTypeIndexSearchResponseDto ) ) ; } facets . addAll ( tagTypeFacets ) ; } if ( ( elasticsearchResponseDto . getTagTypeIndexSearchResponseDtos ( ) ) != null ) { for ( org . finra . herd . model . dto . TagTypeIndexSearchResponseDto tagTypeIndexDto : elasticsearchResponseDto . getTagTypeIndexSearchResponseDtos ( ) ) { boolean foundMatchingTagType = false ; for ( org . finra . herd . model . api . xml . Facet tagFacet : facets ) { if ( tagFacet . getFacetId ( ) . equals ( tagTypeIndexDto . getCode ( ) ) ) { foundMatchingTagType = true ; boolean foundMatchingTagCode = false ; for
org . junit . Assert . assertEquals ( expectedFacets , facets )
getNumActiveIsNegativeWhenPoolIsClosed ( ) { redis . clients . jedis . JedisPool pool = new redis . clients . jedis . JedisPool ( new redis . clients . jedis . JedisPoolConfig ( ) , redis . clients . jedis . tests . JedisPoolTest . hnp . getHost ( ) , redis . clients . jedis . tests . JedisPoolTest . hnp . getPort ( ) , 2000 , "foobared" , 0 , "my_shiny_client_name" ) ; pool . destroy ( ) ; "<AssertPlaceHolder>" ; } getNumActive ( ) { if ( poolInactive ( ) ) { return - 1 ; } return this . internalPool . getNumActive ( ) ; }
org . junit . Assert . assertTrue ( ( ( pool . getNumActive ( ) ) < 0 ) )
testNoSourceIsCreatedIfNoConditionIsPresent ( ) { _addMediaQueries ( new com . liferay . adaptive . media . image . media . query . MediaQuery ( java . util . Collections . emptyList ( ) , com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ) ) ; java . lang . String originalImgTag = "<img<sp>src=\"originalURL\"<sp>data-fileentryid=\"1234\"/>" ; com . liferay . petra . string . StringBundler expectedSB = new com . liferay . petra . string . StringBundler ( 3 ) ; expectedSB . append ( "<picture<sp>data-fileentryid=\"1234\">" ) ; expectedSB . append ( originalImgTag ) ; expectedSB . append ( "</picture>" ) ; java . lang . String pictureTag = _amImageHTMLTagFactory . create ( originalImgTag , _fileEntry ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedSB . toString ( ) , pictureTag )
testCommandHandlers ( ) { sqlline . SqlLine sqlLine = new sqlline . SqlLine ( ) ; java . util . Collection < sqlline . CommandHandler > commandHandlers = org . apache . drill . exec . client . DrillSqlLineApplicationTest . application . getCommandHandlers ( sqlLine ) ; java . util . List < java . lang . String > excludedCommands = java . util . Arrays . asList ( "describe" , "indexes" ) ; java . util . List < sqlline . CommandHandler > matchingCommands = commandHandlers . stream ( ) . filter ( ( c ) -> c . getNames ( ) . stream ( ) . anyMatch ( excludedCommands :: contains ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( currentOffset ) == ( org . apache . drill . exec . vector . complex . impl . RepeatedListReaderImpl . NO_VALUES ) ; }
org . junit . Assert . assertTrue ( matchingCommands . isEmpty ( ) )
testInterpolateWildcard ( ) { java . lang . String regexp = com . alibaba . dubbo . registry . common . route . ParseUtils . interpolate ( "com.alibaba.morgan.*" , new java . util . HashMap < java . lang . String , java . lang . String > ( ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( "com.alibaba.morgan.*" , regexp )
testMultipleWordsQueryUsingKeyword ( ) { java . util . ArrayList < java . lang . String > names = new java . util . ArrayList < java . lang . String > ( java . util . Arrays . asList ( "george<sp>lin<sp>lin" ) ) ; edu . uci . ics . texera . dataflow . dictionarymatcher . Dictionary dictionary = new edu . uci . ics . texera . dataflow . dictionarymatcher . Dictionary ( names ) ; java . util . List < edu . uci . ics . texera . api . span . Span > list = new java . util . ArrayList < edu . uci . ics . texera . api . span . Span > ( ) ; edu . uci . ics . texera . api . span . Span span = new edu . uci . ics . texera . api . span . Span ( "firstName" , 0 , 14 , "george<sp>lin<sp>lin" , "george<sp>lin<sp>lin" ) ; list . add ( span ) ; edu . uci . ics . texera . api . schema . Attribute [ ] schemaAttributes = new edu . uci . ics . texera . api . schema . Attribute [ ( TestConstants . ATTRIBUTES_PEOPLE . length ) + 1 ] ; for ( int count = 0 ; count < ( ( schemaAttributes . length ) - 1 ) ; count ++ ) { schemaAttributes [ count ] = edu . uci . ics . texera . api . constants . test . TestConstants . ATTRIBUTES_PEOPLE [ count ] ; } schemaAttributes [ ( ( schemaAttributes . length ) - 1 ) ] = edu . uci . ics . texera . dataflow . dictionarymatcher . DictionaryMatcherTest . RESULTS_ATTRIBUTE ; edu . uci . ics . texera . api . field . IField [ ] fields1 = new edu . uci . ics . texera . api . field . IField [ ] { new edu . uci . ics . texera . api . field . StringField ( "george<sp>lin<sp>lin" ) , new edu . uci . ics . texera . api . field . StringField ( "lin<sp>clooney" ) , new edu . uci . ics . texera . api . field . IntegerField ( 43 ) , new edu . uci . ics . texera . api . field . DoubleField ( 6.06 ) , new edu . uci . ics . texera . api . field . DateField ( new java . text . SimpleDateFormat ( "MM-dd-yyyy" ) . parse ( "01-13-1973" ) ) , new edu . uci . ics . texera . api . field . TextField ( "Lin<sp>Clooney<sp>is<sp>Short<sp>and<sp>lin<sp>clooney<sp>is<sp>Angry" ) , new edu . uci . ics . texera . api . field . ListField < edu . uci . ics . texera . api . span . Span > ( list ) } ; edu . uci . ics . texera . api . tuple . Tuple tuple1 = new edu . uci . ics . texera . api . tuple . Tuple ( new edu . uci . ics . texera . api . schema . Schema ( schemaAttributes ) , fields1 ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > expectedResults = new java . util . ArrayList < edu . uci . ics . texera . api . tuple . Tuple > ( ) ; expectedResults . add ( tuple1 ) ; java . util . List < java . lang . String > attributeNames = java . util . Arrays . asList ( TestConstants . FIRST_NAME , TestConstants . LAST_NAME , TestConstants . DESCRIPTION ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > returnedResults = edu . uci . ics . texera . dataflow . dictionarymatcher . DictionaryMatcherTestHelper . getQueryResults ( edu . uci . ics . texera . dataflow . dictionarymatcher . DictionaryMatcherTest . PEOPLE_TABLE , dictionary , attributeNames , KeywordMatchingType . CONJUNCTION_INDEXBASED ) ; boolean contains = edu . uci . ics . texera . api . utils . TestUtils . equals ( expectedResults , returnedResults ) ; "<AssertPlaceHolder>" ; } equals ( java . util . List , java . util . List ) { expectedResults = Tuple . Builder . removeIfExists ( expectedResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; exactResults = Tuple . Builder . removeIfExists ( exactResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; if ( ( expectedResults . size ( ) ) != ( exactResults . size ( ) ) ) return false ; return ( expectedResults . containsAll ( exactResults ) ) && ( exactResults . containsAll ( expectedResults ) ) ; }
org . junit . Assert . assertTrue ( contains )
restoreFailsWhenChecksumCheckThrowsIOException ( ) { when ( mockPathUtils . getChecksumFor ( any ( java . nio . file . Path . class ) ) ) . thenThrow ( java . io . IOException . class ) ; "<AssertPlaceHolder>" ; verify ( mockPathUtils ) . getChecksumFor ( any ( java . nio . file . Path . class ) ) ; verifyReportHasMatchingWarning ( report , "Failed<sp>to<sp>compute<sp>checksum" ) ; } restore ( org . codice . ddf . util . function . BiThrowingConsumer ) { org . apache . commons . lang . Validate . notNull ( consumer , "invalid<sp>null<sp>consumer" ) ; if ( ( restored ) == null ) { this . restored = false ; java . util . Optional < java . io . InputStream > is = java . util . Optional . empty ( ) ; try { is = getInputStream ( true ) ; final java . util . Optional < java . io . InputStream > fis = is ; this . restored = getReport ( ) . wasIOSuccessful ( ( ) -> consumer . accept ( getReport ( ) , fis ) ) ; } catch ( java . io . IOException e ) { getReport ( ) . record ( new org . codice . ddf . migration . MigrationException ( Messages . IMPORT_PATH_COPY_ERROR , path , context . getPathUtils ( ) . getDDFHome ( ) , e ) ) ; } finally { is . ifPresent ( org . apache . commons . io . IOUtils :: closeQuietly ) ; } } return restored ; }
org . junit . Assert . assertThat ( entry . restore ( true ) , org . hamcrest . CoreMatchers . equalTo ( false ) )
testGetSetName ( ) { java . lang . String expectedName = "notificationEndPointName" ; com . microsoft . windowsazure . services . media . models . NotificationEndPointInfo notificationEndPointInfo = new com . microsoft . windowsazure . services . media . models . NotificationEndPointInfo ( null , new com . microsoft . windowsazure . services . media . implementation . content . NotificationEndPointType ( ) . setName ( expectedName ) ) ; java . lang . String actualName = notificationEndPointInfo . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( expectedName , actualName )
testQuerySpecific ( ) { final com . zupcat . dao . List < com . zupcat . sample . User > allUsers = userDAO . getByLastName ( "liendo" ) ; "<AssertPlaceHolder>" ; checkSpecificUser ( allUsers . get ( 0 ) ) ; checkSpecificUser ( userDAO . findById ( allUsers . get ( 0 ) . getId ( ) ) ) ; } size ( ) { return getList ( ) . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( allUsers . size ( ) ) == 1 ) )
validate_shouldRejectXmlWhenObsgroupGroupingConceptIdIsMissing ( ) { java . lang . String xml = "<htmlform><obsgroup>TEST</obsgroup></htmlform>" ; org . openmrs . module . htmlformentry . handler . TagAnalysis analysis = validateObsGroupTag ( xml ) ; "<AssertPlaceHolder>" ; } getErrors ( ) { return errors ; }
org . junit . Assert . assertEquals ( 1 , analysis . getErrors ( ) . size ( ) )
hasCorpusSelectionFalse ( ) { "<AssertPlaceHolder>" ; } hasCorpusSelection ( java . util . List , java . util . List ) { return ! ( ( corpusList . isEmpty ( ) ) && ( metaData . isEmpty ( ) ) ) ; }
org . junit . Assert . assertThat ( strategy . hasCorpusSelection ( corpusList , metaData ) , org . hamcrest . Matchers . is ( false ) )
testRemoveValidatorLatitudeNonExist ( ) { "<AssertPlaceHolder>" ; } removeValidator ( com . tech . configurations . tools . ValidationScopes , int ) { if ( i == 0 ) { return false ; } switch ( scope ) { case ROOM_NAME : if ( ( com . tech . models . dtos . MessageDTO . CHATROOM_NAME_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . MessageDTO . CHATROOM_NAME_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . MessageDTO . CHATROOM_NAME_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . MessageDTO . CHATROOM_NAME_VALIDATORS . remove ( i ) ; return true ; } return false ; case LATITUDE : if ( ( com . tech . models . dtos . MessageDTO . LAT_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . MessageDTO . LAT_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . MessageDTO . LAT_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . MessageDTO . LAT_VALIDATORS . remove ( i ) ; return true ; } return false ; case LONGITUDE : if ( ( com . tech . models . dtos . MessageDTO . LNG_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . MessageDTO . LNG_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . MessageDTO . LNG_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . MessageDTO . LNG_VALIDATORS . remove ( i ) ; return true ; } return false ; case STRING : if ( ( com . tech . models . dtos . MessageDTO . MESSAGE_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . MessageDTO . MESSAGE_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . MessageDTO . MESSAGE_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . MessageDTO . MESSAGE_VALIDATORS . remove ( i ) ; return true ; } return false ; case TTL : if ( ( com . tech . models . dtos . MessageDTO . TTL_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . MessageDTO . TTL_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . MessageDTO . TTL_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . MessageDTO . TTL_VALIDATORS . remove ( i ) ; return true ; } case USER_NAME : if ( ( com . tech . models . dtos . MessageDTO . USERNAME_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . MessageDTO . USERNAME_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . MessageDTO . USERNAME_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . MessageDTO . USERNAME_VALIDATORS . remove ( i ) ; return true ; } return false ; default : throw new com . tech . exceptions . customexceptions . ValidatorNotListedException ( ) ; } }
org . junit . Assert . assertFalse ( com . tech . models . dtos . MessageDTO . removeValidator ( ValidationScopes . LATITUDE , 20 ) )
resolveSibling ( ) { java . nio . file . Path rootPath = java . nio . file . Paths . get ( hdfs . jsr203 . TestPath . clusterUri ) ; java . nio . file . Path p = rootPath . resolve ( "dir1/dir2/foo" ) ; java . nio . file . Path p2 = rootPath . resolve ( "dir1/dir2/bar" ) ; "<AssertPlaceHolder>" ; } resolveSibling ( java . nio . file . Path ) { if ( other == null ) throw new java . lang . NullPointerException ( ) ; java . nio . file . Path parent = getParent ( ) ; return parent == null ? other : parent . resolve ( other ) ; }
org . junit . Assert . assertEquals ( p2 , p . resolveSibling ( "bar" ) )
testValid4ProcessItem ( ) { org . talend . core . model . properties . ProcessItem item = PropertiesFactory . eINSTANCE . createProcessItem ( ) ; "<AssertPlaceHolder>" ; } valid ( org . talend . core . model . properties . Item ) { if ( baseItem instanceof org . talend . core . model . properties . ProcessItem ) { return true ; } if ( baseItem instanceof org . talend . core . model . properties . JobletProcessItem ) { return true ; } return false ; }
org . junit . Assert . assertTrue ( handler . valid ( item ) )
withoutPrefix_shouldId2BeGreaterForSameSerials ( ) { org . asteriskjava . manager . event . BridgeEnterEvent bridgeEnterEvent1 = org . asteriskjava . manager . internal . backwardsCompatibility . bridge . BridgeEnterEventComparatorTest . createBridgeEnterEvent ( "1515590350.30" ) ; org . asteriskjava . manager . event . BridgeEnterEvent bridgeEnterEvent2 = org . asteriskjava . manager . internal . backwardsCompatibility . bridge . BridgeEnterEventComparatorTest . createBridgeEnterEvent ( "1515590353.30" ) ; int compareResult = bridgeEnterEventComparator . compare ( bridgeEnterEvent1 , bridgeEnterEvent2 ) ; "<AssertPlaceHolder>" ; } compare ( org . asteriskjava . manager . event . BridgeEnterEvent , org . asteriskjava . manager . event . BridgeEnterEvent ) { java . util . regex . Matcher uniqueId1Matcher = org . asteriskjava . manager . internal . backwardsCompatibility . bridge . BridgeEnterEventComparator . UNIQUE_ID_PATTERN . matcher ( o1 . getUniqueId ( ) ) ; java . util . regex . Matcher uniqueId2Matcher = org . asteriskjava . manager . internal . backwardsCompatibility . bridge . BridgeEnterEventComparator . UNIQUE_ID_PATTERN . matcher ( o2 . getUniqueId ( ) ) ; boolean find1 = uniqueId1Matcher . find ( ) ; boolean find2 = uniqueId2Matcher . find ( ) ; if ( find1 && find2 ) { long epochtime1 = java . lang . Long . valueOf ( uniqueId1Matcher . group ( 1 ) ) ; long epochtime2 = java . lang . Long . valueOf ( uniqueId2Matcher . group ( 1 ) ) ; int serial1 = java . lang . Integer . valueOf ( uniqueId1Matcher . group ( 2 ) ) ; int serial2 = java . lang . Integer . valueOf ( uniqueId2Matcher . group ( 2 ) ) ; return epochtime1 == epochtime2 ? java . lang . Integer . compare ( serial1 , serial2 ) : java . lang . Long . compare ( epochtime1 , epochtime2 ) ; } else if ( ( ! find1 ) && ( ! find2 ) ) { return 0 ; } else { return find1 ? 1 : - 1 ; } }
org . junit . Assert . assertEquals ( ( - 1 ) , compareResult )
shouldThrowAnExceptionForGivenSearchQueryWhenNoIndexSpecifiedForCountQuery ( ) { java . lang . String documentId = java . lang . String . valueOf ( java . util . concurrent . ThreadLocalRandom . current ( ) . nextLong ( ) ) . substring ( 1 , 6 ) ; com . github . vanroy . springdata . jest . SampleEntity sampleEntity = com . github . vanroy . springdata . jest . SampleEntity . builder ( ) . id ( documentId ) . message ( "some<sp>message" ) . version ( java . lang . System . currentTimeMillis ( ) ) . build ( ) ; com . github . vanroy . springdata . jest . IndexQuery indexQuery = getIndexQuery ( sampleEntity ) ; elasticsearchTemplate . index ( indexQuery ) ; elasticsearchTemplate . refresh ( com . github . vanroy . springdata . jest . SampleEntity . class ) ; com . github . vanroy . springdata . jest . SearchQuery searchQuery = new com . github . vanroy . springdata . jest . NativeSearchQueryBuilder ( ) . withQuery ( matchAllQuery ( ) ) . build ( ) ; long count = elasticsearchTemplate . count ( searchQuery ) ; "<AssertPlaceHolder>" ; } count ( com . github . vanroy . springdata . jest . SearchQuery ) { return count ( query , null ) ; }
org . junit . Assert . assertThat ( count , is ( equalTo ( 1L ) ) )
mqttConnectMalformedEndpoints ( ) { com . amazonaws . services . iot . model . DescribeEndpointRequest request = new com . amazonaws . services . iot . model . DescribeEndpointRequest ( ) ; request . setEndpointType ( "iot:Data" ) ; com . amazonaws . services . iot . model . DescribeEndpointResult result = com . amazonaws . mobileconnectors . iot . MqttManagerIntegrationTest . iotClient . describeEndpoint ( request ) ; com . amazonaws . mobileconnectors . iot . MqttManagerIntegrationTest . endpointPrefix = result . getEndpointAddress ( ) . split ( "\\." ) [ 0 ] ; System . out . println ( ( "Endpoint<sp>prefix:<sp>" + ( com . amazonaws . mobileconnectors . iot . MqttManagerIntegrationTest . endpointPrefix ) ) ) ; com . amazonaws . services . iot . model . DescribeEndpointRequest atsRequest = new com . amazonaws . services . iot . model . DescribeEndpointRequest ( ) ; atsRequest . setEndpointType ( "iot:Data-ATS" ) ; com . amazonaws . services . iot . model . DescribeEndpointResult atsResult = com . amazonaws . mobileconnectors . iot . MqttManagerIntegrationTest . iotClient . describeEndpoint ( atsRequest ) ; java . lang . String atsEndpointPrefix = atsResult . getEndpointAddress ( ) . split ( "\\." ) [ 0 ] ; java . lang . String atsEndpointPrefixWithDot = atsEndpointPrefix . replaceAll ( "-" , "iot:Data-ATS" 1 ) ; System . out . println ( ( "iot:Data-ATS" 3 + atsEndpointPrefix ) ) ; final java . lang . String [ ] malformedEndpoints = new java . lang . String [ ] { ( ( ( com . amazonaws . mobileconnectors . iot . MqttManagerIntegrationTest . endpointPrefix ) + "iot:Data-ATS" 1 ) + ( com . amazonaws . regions . Region . getRegion ( Regions . CN_NORTH_1 ) . getName ( ) ) ) + ".amazonaws.com.cn" , ( ( ( com . amazonaws . mobileconnectors . iot . MqttManagerIntegrationTest . endpointPrefix ) + ".iot." ) + ( com . amazonaws . regions . Region . getRegion ( Regions . CN_NORTH_1 ) . getName ( ) ) ) + ".amazonaws.com" , ( ( ( com . amazonaws . mobileconnectors . iot . MqttManagerIntegrationTest . endpointPrefix ) + ".iot." ) + ( com . amazonaws . regions . Region . getRegion ( Regions . US_EAST_1 ) . getName ( ) ) ) + ".amazonaws.com.cn" , ( ( ( com . amazonaws . mobileconnectors . iot . MqttManagerIntegrationTest . endpointPrefix ) + "iot:Data-ATS" 1 ) + ( com . amazonaws . regions . Region . getRegion ( Regions . US_EAST_1 ) . getName ( ) ) ) + ".amazonaws.com.cn" , ( ( atsEndpointPrefix + "iot:Data-ATS" 1 ) + ( com . amazonaws . regions . Region . getRegion ( Regions . CN_NORTH_1 ) . getName ( ) ) ) + ".amazonaws.com.cn" , ( ( atsEndpointPrefix + ".iot." ) + ( com . amazonaws . regions . Region . getRegion ( Regions . CN_NORTH_1 ) . getName ( ) ) ) + ".amazonaws.com" , ( ( atsEndpointPrefix + ".iot." ) + ( com . amazonaws . regions . Region . getRegion ( Regions . US_EAST_1 ) . getName ( ) ) ) + ".amazonaws.com.cn" , ( ( atsEndpointPrefix + "iot:Data-ATS" 1 ) + ( com . amazonaws . regions . Region . getRegion ( Regions . US_EAST_1 ) . getName ( ) ) ) + ".amazonaws.com.cn" , ( ( atsEndpointPrefixWithDot + "iot:Data-ATS" 1 ) + ( com . amazonaws . regions . Region . getRegion ( Regions . CN_NORTH_1 ) . getName ( ) ) ) + ".amazonaws.com.cn" , ( ( atsEndpointPrefixWithDot + ".iot." ) + ( com . amazonaws . regions . Region . getRegion ( Regions . CN_NORTH_1 ) . getName ( ) ) ) + ".amazonaws.com" , ( ( atsEndpointPrefixWithDot + ".iot." ) + ( com . amazonaws . regions . Region . getRegion ( Regions . US_EAST_1 ) . getName ( ) ) ) + ".amazonaws.com.cn" , ( ( atsEndpointPrefixWithDot + "iot:Data-ATS" 1 ) + ( com . amazonaws . regions . Region . getRegion ( Regions . US_EAST_1 ) . getName ( ) ) ) + ".amazonaws.com.cn" } ; for ( final java . lang . String endpoint : malformedEndpoints ) { try { System . out . println ( ( "Trying<sp>to<sp>connect<sp>to<sp>endpoint:<sp>" + endpoint ) ) ; com . amazonaws . mobileconnectors . iot . AWSIotMqttManager mqttManager = new com . amazonaws . mobileconnectors . iot . AWSIotMqttManager ( "iot:Data-ATS" 4 , endpoint ) ; mqttConnect ( mqttManager ) ; } catch ( java . lang . Exception ex ) { System . out . println ( ( ( ( "Received<sp>Exception<sp>for<sp>endpoint:<sp>" + endpoint ) + "iot:Data-ATS" 2 ) + ( ex . getMessage ( ) ) ) ) ; continue ; } "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertTrue ( "iot:Data-ATS" 0 , false )
testTooLongChunkHeader ( ) { final java . lang . String s = "5;<sp>and<sp>some<sp>very<sp>looooong<sp>commend\r\n12345\r\n0\r\n" ; final org . apache . hc . core5 . http . io . SessionInputBuffer inBuffer1 = new org . apache . hc . core5 . http . impl . io . SessionInputBufferImpl ( 16 ) ; final java . io . ByteArrayInputStream inputStream1 = new java . io . ByteArrayInputStream ( s . getBytes ( StandardCharsets . ISO_8859_1 ) ) ; final org . apache . hc . core5 . http . impl . io . ChunkedInputStream in1 = new org . apache . hc . core5 . http . impl . io . ChunkedInputStream ( inBuffer1 , inputStream1 ) ; final byte [ ] buffer = new byte [ 300 ] ; "<AssertPlaceHolder>" ; in1 . close ( ) ; final org . apache . hc . core5 . http . io . SessionInputBuffer inBuffer2 = new org . apache . hc . core5 . http . impl . io . SessionInputBufferImpl ( 16 , 10 ) ; final java . io . ByteArrayInputStream inputStream2 = new java . io . ByteArrayInputStream ( s . getBytes ( StandardCharsets . ISO_8859_1 ) ) ; final org . apache . hc . core5 . http . impl . io . ChunkedInputStream in2 = new org . apache . hc . core5 . http . impl . io . ChunkedInputStream ( inBuffer2 , inputStream2 ) ; try { in2 . read ( buffer ) ; org . junit . Assert . fail ( "MessageConstraintException<sp>expected" ) ; } catch ( final org . apache . hc . core5 . http . MessageConstraintException ex ) { } finally { try { in2 . close ( ) ; } catch ( final org . apache . hc . core5 . http . MessageConstraintException ex ) { } } } read ( java . nio . channels . ReadableByteChannel ) { for ( ; ; ) { switch ( state ) { case HEAD_EXPECTED : if ( ( buffer . remaining ( ) ) >= ( org . apache . hc . core5 . http2 . frame . FrameConsts . HEAD_LEN ) ) { final int lengthAndType = buffer . getInt ( ) ; payloadLen = lengthAndType > > 8 ; if ( ( payloadLen ) > ( maxFramePayloadSize ) ) { throw new org . apache . hc . core5 . http2 . H2ConnectionException ( org . apache . hc . core5 . http2 . H2Error . FRAME_SIZE_ERROR , "Frame<sp>size<sp>exceeds<sp>maximum" ) ; } type = lengthAndType & 255 ; flags = buffer . get ( ) ; streamId = java . lang . Math . abs ( buffer . getInt ( ) ) ; state = org . apache . hc . core5 . http2 . impl . nio . FrameInputBuffer . State . PAYLOAD_EXPECTED ; } else { break ; } case PAYLOAD_EXPECTED : if ( ( buffer . remaining ( ) ) >= ( payloadLen ) ) { if ( ( ( flags ) & ( FrameFlag . PADDED . getValue ( ) ) ) > 0 ) { if ( ( payloadLen ) == 0 ) { throw new org . apache . hc . core5 . http2 . H2ConnectionException ( org . apache . hc . core5 . http2 . H2Error . PROTOCOL_ERROR , "Inconsistent<sp>padding" ) ; } buffer . mark ( ) ; final int padding = buffer . get ( ) ; if ( ( payloadLen ) < ( padding + 1 ) ) { throw new org . apache . hc . core5 . http2 . H2ConnectionException ( org . apache . hc . core5 . http2 . H2Error . PROTOCOL_ERROR , "Inconsistent<sp>padding" ) ; } buffer . reset ( ) ; } final java . nio . ByteBuffer payload = ( ( payloadLen ) > 0 ) ? java . nio . ByteBuffer . wrap ( bytes , buffer . position ( ) , payloadLen ) : null ; buffer . position ( ( ( buffer . position ( ) ) + ( payloadLen ) ) ) ; state = org . apache . hc . core5 . http2 . impl . nio . FrameInputBuffer . State . HEAD_EXPECTED ; metrics . incrementFramesTransferred ( ) ; return new org . apache . hc . core5 . http2 . frame . RawFrame ( type , flags , streamId , payload ) ; } } if ( buffer . hasRemaining ( ) ) { buffer . compact ( ) ; } else { buffer . clear ( ) ; } final int bytesRead = channel . read ( buffer ) ; buffer . flip ( ) ; if ( bytesRead > 0 ) { metrics . incrementBytesTransferred ( bytesRead ) ; } if ( bytesRead == 0 ) { break ; } else if ( bytesRead < 0 ) { if ( ( ( state ) != ( org . apache . hc . core5 . http2 . impl . nio . FrameInputBuffer . State . HEAD_EXPECTED ) ) || ( buffer . hasRemaining ( ) ) ) { throw new org . apache . hc . core5 . http2 . H2CorruptFrameException ( "Corrupt<sp>or<sp>incomplete<sp>HTTP2<sp>frame" ) ; } else { throw new org . apache . hc . core5 . http . ConnectionClosedException ( ) ; } } } return null ; }
org . junit . Assert . assertEquals ( 5 , in1 . read ( buffer ) )
test_next0_4 ( ) { org . trie4j . bv . SuccinctBitVector bv = create ( ) ; for ( int i = 0 ; i < 130 ; i ++ ) { bv . append1 ( ) ; } bv . append0 ( ) ; "<AssertPlaceHolder>" ; } next0 ( int ) { if ( pos >= ( size ) ) return - 1 ; if ( pos <= ( node3pos ) ) { if ( pos <= ( node1pos ) ) return node1pos ; else if ( pos <= ( node2pos ) ) return node2pos ; else return node3pos ; } int i = pos / 8 ; int s = pos % 8 ; if ( s != 0 ) { for ( byte b : org . trie4j . bv . UnsafeBytesSuccinctBitVector . BITPOS0 [ ( ( bytes [ i ] ) & 255 ) ] ) { if ( s <= b ) return ( i * 8 ) + b ; } i ++ ; } int n = ( ( size ) / 8 ) + 1 ; for ( ; i < n ; i ++ ) { byte [ ] poss = org . trie4j . bv . UnsafeBytesSuccinctBitVector . BITPOS0 [ ( ( bytes [ i ] ) & 255 ) ] ; if ( ( poss . length ) > 0 ) { return ( poss [ 0 ] ) + ( i * 8 ) ; } } return - 1 ; }
org . junit . Assert . assertEquals ( 130 , bv . next0 ( 0 ) )
createCoverageMonitor ( ) { java . io . File sessionDir = new java . io . File ( java . lang . System . getProperty ( "java.io.tmpdir" ) ) ; com . occamlab . te . web . CoverageMonitor monitor = new com . occamlab . te . web . CoverageMonitor ( "http://example.org/req1" ) ; monitor . setTestSessionDir ( sessionDir ) ; "<AssertPlaceHolder>" ; } setTestSessionDir ( java . io . File ) { if ( ! ( sessionDir . isDirectory ( ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Not<sp>a<sp>directory:<sp>" + ( testSessionDir ) ) ) ; } this . testSessionDir = sessionDir ; }
org . junit . Assert . assertNotNull ( monitor )
testCheckListShortPath ( ) { org . provebit . merkle . FileMerkle mtree = new org . provebit . merkle . FileMerkle ( HashType . SHA256 ) ; mtree . addTracking ( org . provebit . merkle . FileMerkleTest . completeDirPath , false ) ; mtree . makeTree ( ) ; byte [ ] [ ] tree = mtree . getTree ( ) ; byte [ ] startingHash = tree [ 9 ] ; java . util . List < org . provebit . merkle . MerklePathStep > path = mtree . findPath ( startingHash ) ; path . remove ( 0 ) ; "<AssertPlaceHolder>" ; } checkPath ( java . util . List ) { boolean validPath = ( this . height ) == ( path . size ( ) ) ; if ( validPath && ( ( path . size ( ) ) > 0 ) ) { byte [ ] currentHash = path . get ( 0 ) . getHash ( ) ; if ( existsAsLeaf ( currentHash ) ) { int treeIndex = findLeafIndex ( currentHash ) ; for ( int listIndex = 0 ; ( listIndex < ( path . size ( ) ) ) && validPath ; listIndex ++ ) { boolean correctSide = ( isLeftNode ( treeIndex ) ) == ( path . get ( listIndex ) . onLeft ( ) ) ; boolean correctHash = java . util . Arrays . equals ( tree [ treeIndex ] , path . get ( listIndex ) . getHash ( ) ) ; if ( ( ! correctSide ) || ( ! correctHash ) ) { validPath = false ; } treeIndex = getSibling ( getParent ( treeIndex ) ) ; } } else { validPath = false ; } } return validPath ; }
org . junit . Assert . assertTrue ( ( ! ( mtree . checkPath ( path ) ) ) )
testResourceConfgiWithApplicationPropertyName ( ) { java . util . Map < java . lang . String , java . lang . String > initParams = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; initParams . put ( "javax.ws.rs.Application" , com . sun . jersey . osgi . tests . grizzly . ApplicationTest . ResourceConfigApp . class . getName ( ) ) ; initParams . put ( "property" , "test" ) ; initParams . put ( "feature" , "true" ) ; startServer ( initParams ) ; com . sun . jersey . api . client . WebResource r = com . sun . jersey . api . client . Client . create ( ) . resource ( getUri ( ) . path ( "/" ) . build ( ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { return core . get ( key ) ; }
org . junit . Assert . assertEquals ( "test" , r . get ( java . lang . String . class ) )
testFindPersonLPI ( ) { System . out . println ( "JUnit<sp>Test<sp>getData<sp>-<sp>findPerson<sp>in<sp>the<sp>LPI" ) ; ke . go . moh . oec . PersonRequest requestData = new ke . go . moh . oec . PersonRequest ( ) ; ke . go . moh . oec . Person p = new ke . go . moh . oec . Person ( ) ; requestData . setPerson ( p ) ; java . lang . Object result ; ke . go . moh . oec . PersonResponse pr ; java . util . List < ke . go . moh . oec . Person > pList ; ke . go . moh . oec . PersonIdentifier pi = new ke . go . moh . oec . PersonIdentifier ( ) ; pi . setIdentifier ( "00007/2004" ) ; pi . setIdentifierType ( PersonIdentifier . Type . cccLocalId ) ; java . util . List < ke . go . moh . oec . PersonIdentifier > piList = new java . util . ArrayList < ke . go . moh . oec . PersonIdentifier > ( ) ; piList . add ( pi ) ; p . setPersonIdentifierList ( piList ) ; p . setSiteName ( "Siaya" ) ; requestData . setPerson ( p ) ; pr = callFindPerson ( requestData ) ; "<AssertPlaceHolder>" ; if ( pr != null ) { pList = pr . getPersonList ( ) ; if ( ( pList != null ) && ( ! ( pList . isEmpty ( ) ) ) ) { p = pList . get ( 0 ) ; requestData . setPerson ( p ) ; requestData . setRequestReference ( pr . getRequestReference ( ) ) ; result = ke . go . moh . oec . lib . MediatorTest . mediator . getData ( RequestTypeId . MODIFY_PERSON_MPI , requestData ) ; } } } callFindPerson ( ke . go . moh . oec . PersonRequest ) { ke . go . moh . oec . Person p = personRequest . getPerson ( ) ; java . lang . String log = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "other" 5 + ( searchTerm ( "guid" , p . getPersonGuid ( ) ) ) ) + ( searchTerm ( "death" 7 , p . getFirstName ( ) ) ) ) + ( searchTerm ( "<sp>site:<sp>" 1 , p . getMiddleName ( ) ) ) ) + ( searchTerm ( "other" 0 , p . getLastName ( ) ) ) ) + ( searchTerm ( "<sp>site:<sp>" 9 , p . getClanName ( ) ) ) ) + ( searchTerm ( "other" , p . getOtherName ( ) ) ) ) + ( searchTerm ( "mfname" , p . getMothersFirstName ( ) ) ) ) + ( searchTerm ( "death" 6 , p . getMothersMiddleName ( ) ) ) ) + ( searchTerm ( "death" 5 , p . getMothersLastName ( ) ) ) ) + ( searchTerm ( "death" 0 , p . getFathersFirstName ( ) ) ) ) + ( searchTerm ( "death" 8 , p . getFathersMiddleName ( ) ) ) ) + ( searchTerm ( "<sp>site:<sp>" 7 , p . getFathersLastName ( ) ) ) ) + ( searchTerm ( "other" 6 , p . getCompoundHeadFirstName ( ) ) ) ) + ( searchTerm ( "<sp>site:<sp>" 5 , p . getCompoundHeadMiddleName ( ) ) ) ) + ( searchTerm ( "other" 1 , p . getCompoundHeadLastName ( ) ) ) ) + ( searchTerm ( "death" 3 , n ( p . getSex ( ) ) ) ) ) + ( searchTerm ( "other" 2 , n ( p . getBirthdate ( ) ) ) ) ) + ( searchTerm ( "death" , n ( p . getDeathdate ( ) ) ) ) ) + ( searchTerm ( "<sp>site:<sp>" 2 , n ( p . getMaritalStatus ( ) ) ) ) ) + ( searchTerm ( "other" 7 , p . getVillageName ( ) ) ) ) + ( searchTerm ( "other" 1 , ( ( p . getCompoundHeadLastName ( ) ) + ( searchTerm ( "<sp>site:<sp>" 6 , p . getSiteName ( ) ) ) ) ) ) ; java . util . List < ke . go . moh . oec . PersonIdentifier > piList = p . getPersonIdentifierList ( ) ; if ( piList != null ) { for ( ke . go . moh . oec . PersonIdentifier pi : piList ) { log += ( ( "<sp>pi(" + ( pi . getIdentifierType ( ) . name ( ) ) ) + "other" 3 ) + ( pi . getIdentifier ( ) ) ; } } ke . go . moh . oec . mpi . MpiTest . logger . fine ( log ) ; java . lang . Object result = ke . go . moh . oec . mpi . MpiTest . mpi . getData ( RequestTypeId . FIND_PERSON_MPI , personRequest ) ; org . junit . Assert . assertNotNull ( result ) ; org . junit . Assert . assertSame ( ke . go . moh . oec . PersonResponse . class , result . getClass ( ) ) ; ke . go . moh . oec . PersonResponse personResponse = ( ( ke . go . moh . oec . PersonResponse ) ( result ) ) ; org . junit . Assert . assertTrue ( personResponse . isSuccessful ( ) ) ; java . util . List < ke . go . moh . oec . Person > pList = personResponse . getPersonList ( ) ; if ( ( pList == null ) || ( pList . isEmpty ( ) ) ) { ke . go . moh . oec . mpi . MpiTest . logger . fine ( "<sp>site:<sp>" 8 ) ; } else { for ( ke . go . moh . oec . Person person : pList )
org . junit . Assert . assertNotNull ( pr )
testHasIndexHashKeyEqualCondition_WhenConditionCriteriaIsNonEqualityConditionOnAPropertyWhichIsNeitherAnIndexHashKeyOrAHashKey ( ) { org . mockito . Mockito . when ( entityInformation . isGlobalIndexHashKeyProperty ( "joinDate" ) ) . thenReturn ( false ) ; criteria . withPropertyBetween ( "joinDate" , new java . util . Date ( ) , new java . util . Date ( ) , java . util . Date . class ) ; boolean hasIndexHashKeyEqualCondition = criteria . hasIndexHashKeyEqualCondition ( ) ; "<AssertPlaceHolder>" ; } hasIndexHashKeyEqualCondition ( ) { boolean hasCondition = super . hasIndexHashKeyEqualCondition ( ) ; if ( ! hasCondition ) { if ( ( ( rangeKeyAttributeValue ) != null ) && ( entityInformation . isGlobalIndexHashKeyProperty ( rangeKeyPropertyName ) ) ) { hasCondition = true ; } } return hasCondition ; }
org . junit . Assert . assertFalse ( hasIndexHashKeyEqualCondition )
testGetBeanInterface ( ) { org . oscm . test . ejb . Reference r = new org . oscm . test . ejb . Reference ( org . oscm . test . ejb . Runnable . class , "foo" ) ; "<AssertPlaceHolder>" ; } getInterfaceOrClass ( ) { return type ; }
org . junit . Assert . assertEquals ( org . oscm . test . ejb . Runnable . class , r . getInterfaceOrClass ( ) )
testIsPaused ( ) { this . mockCtx . checking ( new org . jmock . Expectations ( ) { { oneOf ( workers . get ( 0 ) ) . isPaused ( ) ; will ( returnValue ( true ) ) ; } } ) ; "<AssertPlaceHolder>" ; } isPaused ( ) { return this . workers . get ( 0 ) . isPaused ( ) ; }
org . junit . Assert . assertTrue ( this . pool . isPaused ( ) )
testSize003 ( ) { javax . naming . ldap . LdapName ln = new javax . naming . ldap . LdapName ( "t1=test+t2=test,t3=test;t4=test" ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 3 , ln . size ( ) )
testNoArgConstructor ( ) { "<AssertPlaceHolder>" ; } getService ( org . pentaho . big . data . api . cluster . NamedCluster , java . lang . Class ) { clusterInitializer . initialize ( namedCluster ) ; java . util . concurrent . locks . Lock readLock = readWriteLock . readLock ( ) ; try { readLock . lock ( ) ; java . util . Collection < org . pentaho . big . data . api . cluster . service . locator . impl . NamedClusterServiceLocatorImpl . ServiceFactoryAndRanking < ? > > serviceFactoryAndRankings = serviceFactoryMap . get ( serviceClass ) ; if ( serviceFactoryAndRankings != null ) { for ( org . pentaho . big . data . api . cluster . service . locator . impl . NamedClusterServiceLocatorImpl . ServiceFactoryAndRanking < ? > serviceFactoryAndRanking : serviceFactoryAndRankings ) { if ( serviceFactoryAndRanking . namedClusterServiceFactory . canHandle ( namedCluster ) ) { return serviceClass . cast ( serviceFactoryAndRanking . namedClusterServiceFactory . create ( namedCluster ) ) ; } } } } finally { readLock . unlock ( ) ; } return null ; }
org . junit . Assert . assertNull ( new org . pentaho . big . data . api . cluster . service . locator . impl . NamedClusterServiceLocatorImpl ( clusterInitializer ) . getService ( namedCluster , java . lang . Object . class ) )
testMathsDivide ( ) { java . lang . String result = testDialect . getSqlFrom ( new org . alfasoftware . morf . sql . element . MathsField ( new org . alfasoftware . morf . sql . element . FieldLiteral ( 1 ) , org . alfasoftware . morf . sql . element . MathsOperator . DIVIDE , new org . alfasoftware . morf . sql . element . FieldLiteral ( 1 ) ) ) ; "<AssertPlaceHolder>" ; } expectedMathsDivide ( ) { return "1<sp>/<sp>1" ; }
org . junit . Assert . assertEquals ( expectedMathsDivide ( ) , result )
testSegments4 ( ) { java . lang . String path1 = "ab" ; java . lang . String [ ] path2 = new java . lang . String [ ] { "a1" , "{xy}" , "3b<sp>" } ; java . lang . String expected = "ab/a1/x/y/3b%20" ; java . net . URI uri = javax . ws . rs . core . UriBuilder . fromPath ( path1 ) . segment ( path2 ) . build ( new java . lang . Object [ ] { "x/y" } , false ) ; "<AssertPlaceHolder>" ; } toString ( ) { return name ; }
org . junit . Assert . assertEquals ( uri . toString ( ) , expected )
testConvertFromAvroLogicalTimeMicros ( ) { org . talend . components . common . config . jdbc . TalendType expectedType = TalendType . LONG ; org . apache . avro . Schema fieldSchema = org . talend . daikon . avro . AvroUtils . _logicalTimeMicros ( ) ; "<AssertPlaceHolder>" ; } convertFromAvro ( org . apache . avro . Schema ) { org . apache . avro . Schema type = org . talend . daikon . avro . AvroUtils . unwrapIfNullable ( avroType ) ; java . lang . String logicalType = org . talend . daikon . avro . LogicalTypeUtils . getLogicalTypeName ( type ) ; if ( logicalType != null ) { return org . talend . components . common . config . jdbc . TalendType . getTalendByLogicalType ( logicalType ) ; } java . lang . String javaClass = type . getProp ( SchemaConstants . JAVA_CLASS_FLAG ) ; if ( javaClass != null ) { return org . talend . components . common . config . jdbc . TalendType . getTalendByJavaClass ( javaClass ) ; } return org . talend . components . common . config . jdbc . TalendType . getTalendByAvroType ( type . getType ( ) ) ; }
org . junit . Assert . assertEquals ( expectedType , org . talend . components . common . config . jdbc . TalendType . convertFromAvro ( fieldSchema ) )
testVoerStapUit ( ) { final nl . bzk . brp . model . operationeel . kern . AdministratieveHandelingModel administratieveHandeling = maakAdministratieveHandelingModel ( ) ; final java . util . List < nl . bzk . brp . model . hisvolledig . predikaatview . kern . PersoonHisVolledigView > personen = java . util . Collections . singletonList ( new nl . bzk . brp . model . hisvolledig . predikaatview . kern . PersoonHisVolledigView ( nl . bzk . brp . util . testpersoonbouwers . TestPersoonJohnnyJordaan . maak ( ) , nl . bzk . brp . model . hisvolledig . predikaat . HistorieVanafPredikaat . geldigOpEnNa ( nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumAttribuut . vandaag ( ) ) ) ) ; final nl . bzk . brp . model . levering . VolledigBericht volledigBericht = new nl . bzk . brp . model . levering . VolledigBericht ( new nl . bzk . brp . model . levering . AdministratieveHandelingSynchronisatie ( administratieveHandeling ) ) ; volledigBericht . getAdministratieveHandeling ( ) . setBijgehoudenPersonen ( personen ) ; getBerichtContext ( ) . setVolledigBericht ( volledigBericht ) ; final boolean stapResultaat = attributenFilterStap . voerStapUit ( getOnderwerp ( ) , getBerichtContext ( ) , getResultaat ( ) ) ; "<AssertPlaceHolder>" ; verify ( attributenFilterService ) . zetMagGeleverdWordenVlaggen ( any ( nl . bzk . brp . model . hisvolledig . predikaatview . kern . PersoonHisVolledigView . class ) , any ( nl . bzk . brp . model . algemeen . stamgegeven . autaut . Dienst . class ) , any ( nl . bzk . brp . model . algemeen . stamgegeven . kern . Rol . class ) ) ; } getResultaat ( ) { return resultaat ; }
org . junit . Assert . assertThat ( stapResultaat , org . hamcrest . Matchers . is ( true ) )
testRegister ( ) { baeldung . model . Member newMember = new baeldung . model . Member ( ) ; newMember . setName ( "Jane<sp>Doe" ) ; newMember . setEmail ( "jane@mailinator.com" ) ; newMember . setPhoneNumber ( "2125551234" ) ; memberRegistration . register ( newMember ) ; "<AssertPlaceHolder>" ; log . info ( ( ( ( newMember . getName ( ) ) + "<sp>was<sp>persisted<sp>with<sp>id<sp>" ) + ( newMember . getId ( ) ) ) ) ; } getId ( ) { return id ; }
org . junit . Assert . assertNotNull ( newMember . getId ( ) )
shouldCumulateCallsToMustNot ( ) { com . couchbase . client . java . search . queries . PrefixQuery inner1 = com . couchbase . client . java . search . SearchQuery . prefix ( "someterm" ) . boost ( 2 ) ; com . couchbase . client . java . search . queries . PrefixQuery inner2 = com . couchbase . client . java . search . SearchQuery . prefix ( "otherterm" ) ; com . couchbase . client . java . search . queries . BooleanQuery fts = com . couchbase . client . java . search . SearchQuery . booleans ( ) . mustNot ( inner1 ) . mustNot ( inner2 ) ; com . couchbase . client . java . search . SearchQuery query = new com . couchbase . client . java . search . SearchQuery ( "foo" , fts ) ; com . couchbase . client . java . document . json . JsonObject expectedInner1 = com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "prefix" , "someterm" ) . put ( "boost" , 2.0 ) ; com . couchbase . client . java . document . json . JsonObject expectedInner2 = com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "prefix" , "otherterm" ) ; com . couchbase . client . java . document . json . JsonObject expectedMustNot = com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "disjuncts" , com . couchbase . client . java . document . json . JsonArray . from ( expectedInner1 , expectedInner2 ) ) ; com . couchbase . client . java . document . json . JsonObject expected = com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "query" , com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "must_not" , expectedMustNot ) ) ; "<AssertPlaceHolder>" ; } export ( ) { return "INSERT<sp>INTO<sp>" + ( bucket . toString ( ) ) ; }
org . junit . Assert . assertEquals ( expected , query . export ( ) )
testGetDelegationTokenOnHA ( ) { org . apache . hadoop . yarn . api . records . Token token = client . getRMDelegationToken ( new org . apache . hadoop . io . Text ( "<sp>" ) ) ; "<AssertPlaceHolder>" ; } createFakeToken ( ) { java . lang . String identifier = "fake<sp>Token" ; java . lang . String password = "fake<sp>token<sp>passwd" ; org . apache . hadoop . yarn . api . records . Token token = org . apache . hadoop . yarn . api . records . Token . newInstance ( identifier . getBytes ( ) , "<sp>" , password . getBytes ( ) , "<sp>" ) ; return token ; }
org . junit . Assert . assertEquals ( token , cluster . createFakeToken ( ) )
testNonExisting ( ) { java . lang . String name = "testNonExisting" ; com . orientechnologies . orient . core . metadata . sequence . OSequenceLibrary lib = com . orientechnologies . orient . core . sql . executor . ODropSequenceStatementExecutionTest . db . getMetadata ( ) . getSequenceLibrary ( ) ; "<AssertPlaceHolder>" ; try { com . orientechnologies . orient . core . sql . executor . OResultSet result = com . orientechnologies . orient . core . sql . executor . ODropSequenceStatementExecutionTest . db . command ( ( "drop<sp>sequence<sp>" + name ) ) ; org . junit . Assert . fail ( ) ; } catch ( com . orientechnologies . orient . core . exception . OCommandExecutionException ex1 ) { } catch ( java . lang . Exception ex1 ) { org . junit . Assert . fail ( ) ; } } getSequence ( java . lang . String ) { return delegate . getSequence ( database , iName ) ; }
org . junit . Assert . assertNull ( lib . getSequence ( name ) )
testCreate ( ) { org . oscarehr . common . model . FunctionalCentre entity = new org . oscarehr . common . model . FunctionalCentre ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; entity . setAccountId ( "test" ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
org . junit . Assert . assertNotNull ( entity . getId ( ) )
testToObject_empty ( ) { java . util . Collection < ? extends java . lang . String > collection = stringListType . toObject ( "[]" ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { java . io . InputStream is = org . seasar . framework . util . FileInputStreamUtil . create ( file ) ; try { return ( is . read ( ) ) == ( - 1 ) ; } catch ( java . io . IOException e ) { throw new org . seasar . framework . exception . IORuntimeException ( e ) ; } finally { org . seasar . extension . jdbc . gen . internal . util . CloseableUtil . close ( is ) ; } }
org . junit . Assert . assertTrue ( collection . isEmpty ( ) )
testSetCiphersEmpty ( ) { org . eclipse . kura . core . ssl . SslManagerServiceOptions serviceOptions = mock ( org . eclipse . kura . core . ssl . SslManagerServiceOptions . class ) ; org . eclipse . kura . core . ssl . ConnectionSslOptions sslOptions = new org . eclipse . kura . core . ssl . ConnectionSslOptions ( serviceOptions ) ; when ( serviceOptions . getSslCiphers ( ) ) . thenReturn ( "c2" ) ; sslOptions . setCiphers ( "" ) ; "<AssertPlaceHolder>" ; } getCiphers ( ) { return this . ciphers ; }
org . junit . Assert . assertEquals ( "c2" , sslOptions . getCiphers ( ) )
testUpdateWithAccessDenied ( ) { java . lang . Long id = 1L ; java . lang . String name = "name" ; java . lang . String abbrName = "abbrName" ; java . lang . String group = "developers" ; org . lnu . is . domain . department . Department expected = new org . lnu . is . domain . department . Department ( ) ; expected . setId ( id ) ; expected . setAbbrName ( abbrName ) ; expected . setName ( name ) ; expected . setCrtUserGroup ( group ) ; when ( entityManager . merge ( any ( org . lnu . is . domain . department . Department . class ) ) ) . thenReturn ( expected ) ; doThrow ( org . lnu . is . security . exception . AccessDeniedException . class ) . when ( updateVerifier ) . verify ( expected ) ; org . lnu . is . domain . department . Department actual = unit . update ( expected ) ; verify ( entityManager ) . merge ( expected ) ; "<AssertPlaceHolder>" ; } verify ( T ) { verifyLink ( resource ) ; if ( ( nextVerifier ) != null ) { nextVerifier . verify ( resource ) ; } }
org . junit . Assert . assertEquals ( expected , actual )
testGetReferenceKey ( ) { System . out . println ( "getReferenceKey" ) ; kg . apc . jmeter . functions . FifoSize instance = new kg . apc . jmeter . functions . FifoSize ( ) ; java . lang . String expResult = "__fifoSize" ; java . lang . String result = instance . getReferenceKey ( ) ; "<AssertPlaceHolder>" ; } getReferenceKey ( ) { return kg . apc . jmeter . timers . functions . TSTFeedback . KEY ; }
org . junit . Assert . assertEquals ( expResult , result )
testSetPattern ( ) { System . out . println ( "setPattern" ) ; java . lang . String v = "___" ; org . krysalis . barcode4j . impl . AbstractBarcodeBean instance = new org . krysalis . barcode4j . impl . AbstractBarcodeBeanTest . AbstractBarcodeBeanImpl ( ) ; instance . setPattern ( v ) ; "<AssertPlaceHolder>" ; } getPattern ( ) { return this . pattern ; }
org . junit . Assert . assertEquals ( v , instance . getPattern ( ) )
readBitsAcrossIntBoundary ( ) { final byte [ ] data = new byte [ ] { 0 , 0 , 0 , 3 , ( ( byte ) ( 192 ) ) } ; final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( data ) ; final com . flagstone . transform . coder . LittleDecoder fixture = new com . flagstone . transform . coder . LittleDecoder ( stream ) ; fixture . readBits ( 30 , false ) ; "<AssertPlaceHolder>" ; } readBits ( int , boolean ) { int pointer = ( ( index ) << ( com . flagstone . transform . coder . SWFDecoder . BYTES_TO_BITS ) ) + ( offset ) ; if ( ( ( ( size ) << ( com . flagstone . transform . coder . SWFDecoder . BYTES_TO_BITS ) ) - pointer ) < numberOfBits ) { fill ( ) ; pointer = ( ( index ) << ( com . flagstone . transform . coder . SWFDecoder . BYTES_TO_BITS ) ) + ( offset ) ; } int value = 0 ; if ( numberOfBits > 0 ) { if ( ( pointer + numberOfBits ) > ( ( size ) << ( com . flagstone . transform . coder . SWFDecoder . BYTES_TO_BITS ) ) ) { throw new java . lang . ArrayIndexOutOfBoundsException ( ) ; } for ( int i = com . flagstone . transform . coder . SWFDecoder . BITS_PER_INT ; ( i > 0 ) && ( ( index ) < ( buffer . length ) ) ; i -= com . flagstone . transform . coder . SWFDecoder . BITS_PER_BYTE ) { value |= ( ( buffer [ ( ( index ) ++ ) ] ) & ( com . flagstone . transform . coder . SWFDecoder . BYTE_MASK ) ) << ( i - ( com . flagstone . transform . coder . SWFDecoder . BITS_PER_BYTE ) ) ; } value <<= offset ; if ( signed ) { value >>= ( com . flagstone . transform . coder . SWFDecoder . BITS_PER_INT ) - numberOfBits ; } else { value >>>= ( com . flagstone . transform . coder . SWFDecoder . BITS_PER_INT ) - numberOfBits ; } pointer += numberOfBits ; index = pointer > > > ( com . flagstone . transform . coder . SWFDecoder . BITS_TO_BYTES ) ; offset = pointer & ( Coder . LOWEST3 ) ; } return value ; }
org . junit . Assert . assertEquals ( ( - 1 ) , fixture . readBits ( 4 , true ) )
testAddFacetOnField ( ) { org . springframework . data . solr . core . query . FacetOptions options = new org . springframework . data . solr . core . query . FacetOptions ( ) ; options . addFacetOnField ( new org . springframework . data . solr . core . query . SimpleField ( "field_1" ) ) ; options . addFacetOnField ( new org . springframework . data . solr . core . query . SimpleField ( "field_2" ) ) ; "<AssertPlaceHolder>" ; } getFacetOnFields ( ) { return java . util . Collections . unmodifiableList ( this . facetOnFields ) ; }
org . junit . Assert . assertEquals ( 2 , options . getFacetOnFields ( ) . size ( ) )
testContainsChild_withValidChild ( ) { final com . valkryst . VTerminal . TileGrid grid = new com . valkryst . VTerminal . TileGrid ( new java . awt . Dimension ( 1 , 1 ) ) ; parentGrid . addChild ( grid ) ; "<AssertPlaceHolder>" ; } containsChild ( com . valkryst . VTerminal . TileGrid ) { if ( child == null ) { return false ; } childLock . readLock ( ) . lock ( ) ; final boolean containsChild = childGrids . contains ( child ) ; childLock . readLock ( ) . unlock ( ) ; return containsChild ; }
org . junit . Assert . assertTrue ( parentGrid . containsChild ( grid ) )
serialize2 ( ) { org . xmldb . api . base . Collection testCollection = org . xmldb . api . DatabaseManager . getCollection ( ( ( ( ROOT_URI ) + "/" ) + ( org . exist . xmldb . TestEXistXMLSerialize . TEST_COLLECTION ) ) ) ; org . w3c . dom . Document doc = javax . xml . parsers . DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) . parse ( java . nio . file . Paths . get ( testFile . toURI ( ) ) . toFile ( ) ) ; org . xmldb . api . modules . XMLResource resource = ( ( org . xmldb . api . modules . XMLResource ) ( testCollection . createResource ( null , "XMLResource" ) ) ) ; resource . setContentAsDOM ( doc ) ; testCollection . storeResource ( resource ) ; resource = ( ( org . xmldb . api . modules . XMLResource ) ( testCollection . getResource ( resource . getId ( ) ) ) ) ; "<AssertPlaceHolder>" ; org . w3c . dom . Node node = resource . getContentAsDOM ( ) ; org . apache . xml . serialize . OutputFormat format = new org . apache . xml . serialize . OutputFormat ( ) ; format . setLineWidth ( 0 ) ; format . setIndent ( 5 ) ; format . setPreserveSpace ( true ) ; try ( final org . exist . util . io . FastByteArrayOutputStream out = new org . exist . util . io . FastByteArrayOutputStream ( ) ) { org . apache . xml . serialize . XMLSerializer serializer = new org . apache . xml . serialize . XMLSerializer ( out , format ) ; if ( node instanceof org . w3c . dom . Document ) { serializer . serialize ( ( ( org . w3c . dom . Document ) ( node ) ) ) ; } else if ( node instanceof org . w3c . dom . Element ) { serializer . serialize ( ( ( org . w3c . dom . Element ) ( node ) ) ) ; } else { org . junit . Assert . fail ( ( "Can't<sp>serialize<sp>node<sp>type:<sp>" + node ) ) ; } } } getId ( ) { return id ; }
org . junit . Assert . assertNotNull ( resource )
testParseSQLWithWhitespace ( ) { java . lang . String schemaStr = "map_field<sp>map<<sp>string<sp>,<sp>int<sp>><sp>not<sp>null,\n" + "arr_field<sp>array<<sp>record<<sp>x:int<sp>,<sp>y:double<sp>>\t><sp>not<sp>null" ; io . cdap . cdap . api . data . schema . Schema expectedSchema = io . cdap . cdap . api . data . schema . Schema . recordOf ( "rec" , Schema . Field . of ( "map_field" , io . cdap . cdap . api . data . schema . Schema . mapOf ( io . cdap . cdap . api . data . schema . Schema . nullableOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) , io . cdap . cdap . api . data . schema . Schema . nullableOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . INT ) ) ) ) , Schema . Field . of ( "arr_field" , io . cdap . cdap . api . data . schema . Schema . arrayOf ( io . cdap . cdap . api . data . schema . Schema . nullableOf ( io . cdap . cdap . api . data . schema . Schema . recordOf ( "rec1" , Schema . Field . of ( "x" , io . cdap . cdap . api . data . schema . Schema . nullableOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . INT ) ) ) , Schema . Field . of ( "y" , io . cdap . cdap . api . data . schema . Schema . nullableOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . DOUBLE ) ) ) ) ) ) ) ) ; "<AssertPlaceHolder>" ; } parseSQL ( java . lang . String ) { return new io . cdap . cdap . internal . io . SQLSchemaParser ( schemaString ) . parse ( ) ; }
org . junit . Assert . assertEquals ( expectedSchema , io . cdap . cdap . api . data . schema . Schema . parseSQL ( schemaStr ) )
textPlainContentType ( ) { org . apache . usergrid . rest . test . resource . model . User user = new org . apache . usergrid . rest . test . resource . model . User ( "shawn" , "shawn" , "shawn@email.com" , "aliensquirrel" ) ; this . app ( ) . collection ( "users" ) . post ( user ) ; org . apache . usergrid . rest . test . resource . model . Token token = this . app ( ) . token ( ) . post ( new org . apache . usergrid . rest . test . resource . model . Token ( "shawn" , "aliensquirrel" ) ) ; java . util . Map < java . lang . String , java . lang . String > data = hashMap ( "name" , "Solitaire2" ) ; java . lang . String json = org . apache . usergrid . utils . JsonUtils . mapToFormattedJsonString ( data ) ; org . apache . http . impl . client . DefaultHttpClient client = new org . apache . http . impl . client . DefaultHttpClient ( ) ; org . apache . http . HttpHost host = new org . apache . http . HttpHost ( super . getBaseURI ( ) . getHost ( ) , super . getBaseURI ( ) . getPort ( ) ) ; org . apache . http . client . methods . HttpPost post = new org . apache . http . client . methods . HttpPost ( java . lang . String . format ( "/%s/%s/games" , this . clientSetup . getOrganization ( ) . getName ( ) , this . clientSetup . getAppName ( ) ) ) ; post . setEntity ( new org . apache . http . entity . StringEntity ( json ) ) ; post . setHeader ( HttpHeaders . AUTHORIZATION , ( "Bearer<sp>" + ( token . getAccessToken ( ) ) ) ) ; post . setHeader ( HttpHeaders . ACCEPT , MediaType . APPLICATION_JSON ) ; post . setHeader ( HttpHeaders . CONTENT_TYPE , MediaType . TEXT_PLAIN ) ; org . apache . http . HttpResponse rsp = client . execute ( host , post ) ; printResponse ( rsp ) ; "<AssertPlaceHolder>" ; } printResponse ( org . apache . http . HttpResponse ) { org . apache . http . HttpEntity entity = rsp . getEntity ( ) ; System . out . println ( "----------------------------------------" ) ; System . out . println ( rsp . getStatusLine ( ) ) ; org . apache . http . Header [ ] headers = rsp . getAllHeaders ( ) ; for ( int i = 0 ; i < ( headers . length ) ; i ++ ) { System . out . println ( headers [ i ] ) ; } System . out . println ( "----------------------------------------" ) ; if ( entity != null ) { System . out . println ( org . apache . http . util . EntityUtils . toString ( entity ) ) ; } }
org . junit . Assert . assertEquals ( 200 , rsp . getStatusLine ( ) . getStatusCode ( ) )
testPassThroughDelete ( ) { java . lang . String data = "somedata" ; java . lang . String responseBody = client . target ( ( ( "http://localhost:" + ( com . kunai . keyvault . IntegrationTest . RULE . getLocalPort ( ) ) ) + "/proxy" ) ) . request ( ) . header ( "proxy-url" , "http://httpbin.org/delete" ) . header ( "some-header" , data ) . delete ( ) . readEntity ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( responseBody . toLowerCase ( ) . contains ( data ) )
getSfLogicalInterfaces ( ) { org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . common . rev151017 . SfName sf1Name = new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . common . rev151017 . SfName ( "dpi" ) ; java . lang . String dpiIpAddress = "192.168.1.30" ; org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sf . rev140701 . service . functions . ServiceFunctionKey dpiKey = new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sf . rev140701 . service . functions . ServiceFunctionKey ( sf1Name ) ; java . util . List < org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sf . rev140701 . service . function . base . SfDataPlaneLocator > dpLocators = new java . util . ArrayList < org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sf . rev140701 . service . function . base . SfDataPlaneLocator > ( ) { { add ( new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sf . rev140701 . service . function . base . SfDataPlaneLocatorBuilder ( ) . withKey ( new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sf . rev140701 . service . function . base . SfDataPlaneLocatorKey ( new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . common . rev151017 . SfDataPlaneLocatorName ( "dpi-1-dpl" ) ) ) . setServiceFunctionForwarder ( new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . common . rev151017 . SffName ( "sfflogical1" ) ) . setLocatorType ( new org . opendaylight . yang . gen . v1 . urn . ericsson . params . xml . ns . yang . sfc . sff . logical . rev160620 . service . functions . service . function . sf . data . plane . locator . locator . type . LogicalInterfaceBuilder ( ) . setInterfaceName ( "40c552e0-3695-472d-bace-7618786aba27" ) . build ( ) ) . build ( ) ) ; add ( new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sf . rev140701 . service . function . base . SfDataPlaneLocatorBuilder ( ) . withKey ( new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sf . rev140701 . service . function . base . SfDataPlaneLocatorKey ( new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . common . rev151017 . SfDataPlaneLocatorName ( "dpi-2-dpl" ) ) ) . setServiceFunctionForwarder ( new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . common . rev151017 . SffName ( "sfflogical1" ) ) . setLocatorType ( new org . opendaylight . yang . gen . v1 . urn . ericsson . params . xml . ns . yang . sfc . sff . logical . rev160620 . service . functions . service . function . sf . data . plane . locator . locator . type . LogicalInterfaceBuilder ( ) . setInterfaceName ( "12345678-3695-472d-bace-7618786aba27" ) . build ( ) ) . build ( ) ) ; } } ; org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sf . rev140701 . service . functions . ServiceFunction dpiNode = new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sf . rev140701 . service . functions . ServiceFunctionBuilder ( ) . withKey ( dpiKey ) . setIpMgmtAddress ( org . opendaylight . yang . gen . v1 . urn . ietf . params . xml . ns . yang . ietf . inet . types . rev130715 . IpAddressBuilder . getDefaultInstance ( dpiIpAddress ) ) . setRestUri ( new org . opendaylight . yang . gen . v1 . urn . ietf . params . xml . ns . yang . ietf . inet . types . rev130715 . Uri ( dpiIpAddress . concat ( ":5000" ) ) ) . setType ( new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . common . rev151017 . SftTypeName ( "dpi" ) ) . setSfDataPlaneLocator ( dpLocators ) . build ( ) ; "<AssertPlaceHolder>" ; } getSfLogicalInterfaces ( org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sf . rev140701 . service . functions . ServiceFunction ) { return sf . getSfDataPlaneLocator ( ) . stream ( ) . map ( org . opendaylight . sfc . genius . util . SfcGeniusDataUtils :: getLogicalInterfaceNameFromLocator ) . filter ( Objects :: nonNull ) . collect ( java . util . stream . Collectors . toList ( ) ) ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "40c552e0-3695-472d-bace-7618786aba27" , "12345678-3695-472d-bace-7618786aba27" ) , org . opendaylight . sfc . genius . util . SfcGeniusDataUtils . getSfLogicalInterfaces ( dpiNode ) )
testScriptLoadEvalSha ( ) { getResults ( ) ; java . lang . String sha1 = connection . scriptLoad ( "return<sp>KEYS[1]" ) ; initConnection ( ) ; actual . add ( connection . evalSha ( sha1 , ReturnType . VALUE , 2 , "key1" , "key2" ) ) ; "<AssertPlaceHolder>" ; } getResults ( ) { connection . exec ( ) ; java . util . List < java . lang . Object > txResults = ( ( java . util . List < java . lang . Object > ) ( connection . closePipeline ( ) . get ( 0 ) ) ) ; return txResults ; }
org . junit . Assert . assertEquals ( "key1" , new java . lang . String ( ( ( byte [ ] ) ( getResults ( ) . get ( 0 ) ) ) ) )
testHasClientDeviceService ( ) { com . eclipsesource . tabris . TabrisClient client = new com . eclipsesource . tabris . internal . TabrisClientImpl ( ) ; com . eclipsesource . tabris . device . ClientDevice device = client . getService ( com . eclipsesource . tabris . device . ClientDevice . class ) ; "<AssertPlaceHolder>" ; } getService ( java . lang . Class ) { T result = null ; if ( type == ( com . eclipsesource . tabris . interaction . AppLauncher . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . AppLauncherImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . app . App . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . AppImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . ClientStore . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . ClientStoreImpl . class ) ) ) ; } else if ( ( type == ( com . eclipsesource . tabris . device . ClientDevice . class ) ) || ( type == ( org . eclipse . rap . rwt . client . service . ClientInfo . class ) ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . ClientDeviceImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . push . CloudPush . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . CloudPushImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . camera . Camera . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . CameraImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . camera . PhotoAlbum . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . PhotoAlbumImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . geolocation . Geolocation . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . GeolocationImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . print . Printer . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . PrinterImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . client . service . StartupParameters . class ) ) { result = ( ( T ) ( getSessionInstance ( org . eclipse . rap . rwt . internal . client . StartupParametersImpl . class ) ) ) ; } return result ; }
org . junit . Assert . assertNotNull ( device )
objectFromFieldShouldReturnObject ( ) { java . lang . Object actual = "object" ; org . apache . storm . tuple . Tuple tuple = mock ( org . apache . storm . tuple . Tuple . class ) ; when ( tuple . getValueByField ( "tuple_field" ) ) . thenReturn ( actual ) ; java . lang . Object expected = "object" ; org . apache . metron . common . message . MessageGetStrategy messageGetStrategy = MessageGetters . OBJECT_FROM_FIELD . get ( "tuple_field" ) ; "<AssertPlaceHolder>" ; } get ( org . apache . metron . performance . load . CommandLine ) { return cli . getOptionValue ( shortCode ) ; }
org . junit . Assert . assertEquals ( expected , messageGetStrategy . get ( tuple ) )
testToVXRepositoryForNull ( ) { org . apache . ranger . plugin . model . RangerService rangerService = null ; org . apache . ranger . view . VXRepository actualvXRepository = serviceUtil . toVXRepository ( rangerService ) ; "<AssertPlaceHolder>" ; } toVXRepository ( org . apache . ranger . plugin . model . RangerService ) { if ( ( service == null ) || ( ( org . apache . ranger . common . ServiceUtil . toAssetType ( service . getType ( ) ) ) == null ) ) { return null ; } org . apache . ranger . view . VXRepository ret = new org . apache . ranger . view . VXRepository ( ) ; rangerObjectToDataObject ( service , ret ) ; ret . setRepositoryType ( service . getType ( ) ) ; ret . setName ( service . getName ( ) ) ; ret . setDescription ( service . getDescription ( ) ) ; ret . setIsActive ( service . getIsEnabled ( ) ) ; ret . setConfig ( jsonUtil . readMapToString ( service . getConfigs ( ) ) ) ; ret . setVersion ( java . lang . Long . toString ( service . getVersion ( ) ) ) ; return ret ; }
org . junit . Assert . assertNull ( actualvXRepository )
testGetChildrenConcatenate ( ) { org . orbisgis . coremap . renderer . se . parameter . string . StringConcatenate conc = getConcatenate ( ) ; "<AssertPlaceHolder>" ; } getChildren ( ) { java . util . List < org . orbisgis . sif . components . fstree . AbstractTreeNode > childrenRet = new java . util . ArrayList < org . orbisgis . sif . components . fstree . AbstractTreeNode > ( getChildCount ( ) ) ; for ( javax . swing . tree . MutableTreeNode child : children ) { childrenRet . add ( ( ( org . orbisgis . sif . components . fstree . AbstractTreeNode ) ( child ) ) ) ; } return childrenRet ; }
org . junit . Assert . assertTrue ( ( ( conc . getChildren ( ) . size ( ) ) == 2 ) )
testGetOnDemandControlFrequencyNone ( ) { org . hyperic . util . pager . PageList < org . hyperic . hq . control . shared . ControlFrequencyValue > frequencies = controlScheduleManager . getOnDemandControlFrequency ( authzSubjectManager . getOverlordPojo ( ) , 1 ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . size ; }
org . junit . Assert . assertEquals ( 0 , frequencies . size ( ) )
testPrettyPrintAPDUResponse_byteArr ( ) { System . out . println ( "prettyPrintAPDUResponse" ) ; byte [ ] data = sasc . util . Util . fromHexString ( ( "prettyPrintAPDUResponse" 3 + ( ( ( ( ( "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" + "prettyPrintAPDUResponse" 1 ) + "<sp>53<sp>65<sp>63<sp>75<sp>72<sp>65<sp>43<sp>6f<sp>64<sp>65<sp>20<sp>41<sp>75<sp>74<sp>68<sp>(=SecureCode<sp>Auth)\n" 1 ) + "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" 3 ) + "07<sp>a0<sp>00<sp>00<sp>03<sp>15<sp>60<sp>20<sp>50<sp>08<sp>43<sp>68<sp>69<sp>70<sp>6b<sp>6e" ) + "prettyPrintAPDUResponse" 2 ) ) ) ; java . lang . String expResult = "<sp>53<sp>65<sp>63<sp>75<sp>72<sp>65<sp>43<sp>6f<sp>64<sp>65<sp>20<sp>41<sp>75<sp>74<sp>68<sp>(=SecureCode<sp>Auth)\n" 0 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "prettyPrintAPDUResponse" 7 + "prettyPrintAPDUResponse" 0 ) + "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" 1 ) + "<sp>a0<sp>00<sp>00<sp>03<sp>15<sp>10<sp>10<sp>05<sp>28<sp>(BINARY)\n" ) + "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" 9 ) + "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" 8 ) + "<sp>87<sp>01<sp>--<sp>Application<sp>Priority<sp>Indicator\n" ) + "prettyPrintAPDUResponse" 5 ) + "<sp>61<sp>15<sp>--<sp>Application<sp>Template\n" ) + "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" 5 ) + "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" 6 ) + "prettyPrintAPDUResponse" 8 ) + "prettyPrintAPDUResponse" 6 ) + "<sp>87<sp>01<sp>--<sp>Application<sp>Priority<sp>Indicator\n" ) + "<sp>02<sp>(BINARY)\n" ) + "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" 0 ) + "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" 5 ) + "<sp>a0<sp>00<sp>00<sp>00<sp>04<sp>80<sp>02<sp>(BINARY)\n" ) + "prettyPrintAPDUResponse" 4 ) + "<sp>53<sp>65<sp>63<sp>75<sp>72<sp>65<sp>43<sp>6f<sp>64<sp>65<sp>20<sp>41<sp>75<sp>74<sp>68<sp>(=SecureCode<sp>Auth)\n" ) + "<sp>87<sp>01<sp>--<sp>Application<sp>Priority<sp>Indicator\n" ) + "<sp>00<sp>(BINARY)\n" ) + "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" 4 ) + "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" 5 ) + "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" 7 ) + "03<sp>50<sp>49<sp>4e<sp>87<sp>01<sp>01<sp>61<sp>15<sp>4f<sp>07<sp>a0<sp>00<sp>00<sp>00<sp>04" 2 ) + "prettyPrintAPDUResponse" 9 ) + "<sp>87<sp>01<sp>--<sp>Application<sp>Priority<sp>Indicator\n" ) + "<sp>53<sp>65<sp>63<sp>75<sp>72<sp>65<sp>43<sp>6f<sp>64<sp>65<sp>20<sp>41<sp>75<sp>74<sp>68<sp>(=SecureCode<sp>Auth)\n" 2 ) ; java . lang . String result = sasc . iso7816 . TLVUtil . prettyPrintAPDUResponse ( data ) ; "<AssertPlaceHolder>" ; } prettyPrintAPDUResponse ( byte [ ] ) { return sasc . iso7816 . TLVUtil . prettyPrintAPDUResponse ( data , 0 ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testApplyRowChangeParitalRowSet ( ) { appendAbleRowSetRequest . setToAppend ( partialRowSet ) ; org . sagebionetworks . repo . model . table . TableUpdateResponse result = manager . applyRowChange ( mockProgressCallback , user , appendAbleRowSetRequest ) ; "<AssertPlaceHolder>" ; verify ( mockTableManagerSupport ) . getColumnModelsForTable ( viewId ) ; } applyRowChange ( org . sagebionetworks . common . util . progress . ProgressCallback , org . sagebionetworks . repo . model . UserInfo , org . sagebionetworks . repo . model . table . UploadToTableRequest ) { return tableUploadManager . uploadCSV ( progressCallback , user , change , this ) ; }
org . junit . Assert . assertNotNull ( result )
testExecuteWithPersonWithOnlyOriginalAuthor ( ) { final java . lang . Long activityId1 = 6792L ; java . util . List < java . lang . Long > actual = sut . execute ( "csagan" , EntityType . PERSON ) ; java . util . Collections . sort ( actual ) ; java . util . List < java . lang . Long > expected = new java . util . ArrayList < java . lang . Long > ( ) ; expected . add ( activityId1 ) ; "<AssertPlaceHolder>" ; } add ( T ) { return wrapped . add ( e ) ; }
org . junit . Assert . assertEquals ( expected , actual )
decodeExtended ( ) { final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( extended ) ; final com . flagstone . transform . coder . SWFDecoder decoder = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; final com . flagstone . transform . coder . Context context = new com . flagstone . transform . coder . Context ( ) ; fixture = new com . flagstone . transform . shape . DefineMorphShape2 ( decoder , context ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( fixture )
hashCodeSelf ( ) { final com . lightboxtechnologies . nsrl . ProdData pd = new com . lightboxtechnologies . nsrl . ProdData ( com . lightboxtechnologies . nsrl . ProdDataTest . code , com . lightboxtechnologies . nsrl . ProdDataTest . name , com . lightboxtechnologies . nsrl . ProdDataTest . version , com . lightboxtechnologies . nsrl . ProdDataTest . os_code , com . lightboxtechnologies . nsrl . ProdDataTest . mfg_code , com . lightboxtechnologies . nsrl . ProdDataTest . language , app_type ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return sha1 . hashCode ( ) ; }
org . junit . Assert . assertTrue ( ( ( pd . hashCode ( ) ) == ( pd . hashCode ( ) ) ) )
testNoFalsePositives ( ) { org . obolibrary . robot . OWLOntology ontology = loadOntology ( "/simple.owl" ) ; org . semanticweb . owlapi . reasoner . OWLReasonerFactory reasonerFactory = new org . semanticweb . elk . owlapi . ElkReasonerFactory ( ) ; org . semanticweb . owlapi . reasoner . OWLReasoner reasoner = reasonerFactory . createReasoner ( ontology ) ; org . obolibrary . robot . ReasonerHelper . validate ( reasoner ) ; "<AssertPlaceHolder>" ; } validate ( org . semanticweb . owlapi . reasoner . OWLReasoner ) { org . obolibrary . robot . ReasonerHelper . validate ( reasoner , null , null ) ; }
org . junit . Assert . assertTrue ( true )
receiveNegativeLengthMessage ( ) { final org . xnio . ByteBufferSlicePool pool = new org . xnio . ByteBufferSlicePool ( org . xnio . BufferAllocator . BYTE_BUFFER_ALLOCATOR , 10 , ( 10 * 16 ) ) ; final org . xnio . channels . FramedMessageChannel channel = new org . xnio . channels . FramedMessageChannel ( connectedChannel , pool . allocate ( ) , pool . allocate ( ) ) ; try { connectedChannel . setReadDataWithLength ( ( - 8 ) , "abcdefgh" ) ; connectedChannel . enableRead ( true ) ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 10 ) ; boolean failed = false ; try { channel . receive ( buffer ) ; } catch ( java . io . IOException e ) { failed = true ; } "<AssertPlaceHolder>" ; } finally { channel . close ( ) ; } } receive ( java . nio . ByteBuffer ) { return readable . receive ( buffer ) ; }
org . junit . Assert . assertTrue ( failed )
unidirectionalOneToMany ( ) { log . info ( "...<sp>unidirectionalOneToMany<sp>..." ) ; javax . persistence . EntityManager em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; org . thoughts . on . java . model . Book b = em . find ( org . thoughts . on . java . model . Book . class , 1L ) ; org . thoughts . on . java . model . Review r = new org . thoughts . on . java . model . Review ( ) ; r . setComment ( "This<sp>is<sp>a<sp>comment" ) ; b . getReviews ( ) . add ( r ) ; em . persist ( r ) ; em . getTransaction ( ) . commit ( ) ; em . close ( ) ; em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; b = em . find ( org . thoughts . on . java . model . Book . class , 1L ) ; java . util . List < org . thoughts . on . java . model . Review > reviews = b . getReviews ( ) ; "<AssertPlaceHolder>" ; em . getTransaction ( ) . commit ( ) ; em . close ( ) ; } close ( ) { emf . close ( ) ; }
org . junit . Assert . assertTrue ( reviews . contains ( r ) )
interThreadMessaging ( ) { final java . lang . String rulebase = "rules/reloaded/async_2.prova" ; java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; java . util . Map < java . lang . String , java . lang . Object > globals = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; globals . put ( "$Count" , count ) ; prova = new ws . prova . api2 . ProvaCommunicatorImpl ( test . ws . prova . test2 . ProvaMessagingTest . kAgent , test . ws . prova . test2 . ProvaMessagingTest . kPort , rulebase , ws . prova . api2 . ProvaCommunicatorImpl . SYNC , globals ) ; try { synchronized ( this ) { wait ( 2000 ) ; "<AssertPlaceHolder>" ; } } catch ( java . lang . Exception e ) { } } get ( ) { return count ; }
org . junit . Assert . assertEquals ( 3 , count . get ( ) )
test_BrowserFunction_callback_with_integer ( ) { org . junit . Assume . assumeFalse ( webkit1SkipMsg ( ) , isWebkit1 ) ; java . util . concurrent . atomic . AtomicInteger returnInt = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; class JavascriptCallback extends org . eclipse . swt . browser . BrowserFunction { JavascriptCallback ( org . eclipse . swt . browser . Browser browser , java . lang . String name ) { ( browser , name ) ; } @ org . eclipse . swt . tests . junit . Override public java . lang . Object function ( java . lang . Object [ ] arguments ) { java . lang . Double returnedDouble = ( ( java . lang . Double ) ( arguments [ 0 ] ) ) ; returnInt . set ( returnedDouble . intValue ( ) ) ; return null ; } } java . lang . String htmlWithScript = "<html><head>\n" + ( ( ( ( ( ( ( ( "<script<sp>language=\"JavaScript\">\n" + "function<sp>callCustomFunction()<sp>{\n" ) + "<sp>document.body.style.backgroundColor<sp>=<sp>\'red\'\n" ) + "\t\tjsCallbackToJava(5)\n" ) + "<sp>document.body.style.backgroundColor<sp>=<sp>\'red\'\n" 0 ) + "</script>\n" ) + "</head>\n" ) + "<body><sp>I\'m<sp>going<sp>to<sp>make<sp>a<sp>callback<sp>to<sp>java<sp></body>\n" ) + "</html>\n" ) ; browser . setText ( htmlWithScript ) ; new JavascriptCallback ( browser , "<sp>document.body.style.backgroundColor<sp>=<sp>\'red\'\n" 1 ) ; browser . addProgressListener ( callCustomFunctionUponLoad ) ; shell . open ( ) ; boolean passed = waitForPassCondition ( ( ) -> ( returnInt . get ( ) ) == 5 ) ; java . lang . String message = "<sp>document.body.style.backgroundColor<sp>=<sp>\'red\'\n" 2 ; "<AssertPlaceHolder>" ; } waitForPassCondition ( java . util . function . Supplier ) { return waitForPassCondition ( passTest , ( 1000 * ( secondsToWaitTillFail ) ) ) ; }
org . junit . Assert . assertTrue ( message , passed )
testIsInstalledRecursiveCase ( ) { final org . w3c . dom . Document doc = javax . xml . parsers . DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) . newDocument ( ) ; final org . jboss . errai . forge . facet . resource . List < org . w3c . dom . Node > nodes = org . jboss . errai . forge . facet . resource . Arrays . asList ( new org . w3c . dom . Node [ ] { doc . createElement ( "first" ) , doc . createElement ( "first" ) } ) ; nodes . get ( 0 ) . appendChild ( doc . createElement ( "second" ) ) . appendChild ( doc . createElement ( "third" ) ) ; nodes . get ( 0 ) . getFirstChild ( ) . appendChild ( doc . createElement ( "fourth" ) ) ; nodes . get ( 0 ) . appendChild ( doc . createElement ( "fifth" ) ) ; ( ( org . w3c . dom . Element ) ( nodes . get ( 1 ) . appendChild ( doc . createElement ( "second" ) ) ) ) . setAttribute ( "name" , "test" ) ; final org . jboss . errai . forge . facet . resource . Map < java . lang . String , org . jboss . errai . forge . facet . resource . Collection < org . w3c . dom . Node > > insertMap = new org . jboss . errai . forge . facet . resource . HashMap < java . lang . String , org . jboss . errai . forge . facet . resource . Collection < org . w3c . dom . Node > > ( 1 ) ; insertMap . put ( "/main" , nodes ) ; final org . jboss . errai . forge . facet . resource . Map < java . lang . String , org . w3c . dom . Node > empty = new org . jboss . errai . forge . facet . resource . HashMap < java . lang . String , org . w3c . dom . Node > ( 0 ) ; final org . jboss . forge . addon . projects . Project project = initializeJavaProject ( ) ; final org . jboss . errai . forge . facet . resource . AbstractXmlResourceFacetTest . TestXmlResourceFacet testFacet = new org . jboss . errai . forge . facet . resource . AbstractXmlResourceFacetTest . TestXmlResourceFacet ( writeResourceToFile ( "org/jboss/errai/forge/facet/resource/AbstractXmlResourceFacetTest-1.xml" ) , insertMap , empty , empty ) ; testFacet . setFaceted ( project ) ; "<AssertPlaceHolder>" ; } isInstalled ( ) { final org . jboss . forge . addon . maven . projects . MavenFacet coreFacet = getProject ( ) . getFacet ( org . jboss . forge . addon . maven . projects . MavenFacet . class ) ; final org . apache . maven . model . Model pom = coreFacet . getModel ( ) ; final org . apache . maven . model . Build build = pom . getBuild ( ) ; java . util . Properties properties = pom . getProperties ( ) ; return ! ( ( ( ( ( ( ( build == null ) || ( ! ( properties . containsKey ( Property . JbossHome . getName ( ) ) ) ) ) || ( ! ( properties . get ( Property . JbossHome . getName ( ) ) . equals ( org . jboss . errai . forge . facet . base . CoreBuildFacet . JBOSS_HOME ) ) ) ) || ( ! ( properties . containsKey ( Property . DevContext . getName ( ) ) ) ) ) || ( ! ( properties . get ( Property . DevContext . getName ( ) ) . equals ( org . jboss . errai . forge . facet . base . CoreBuildFacet . DEV_CONTEXT ) ) ) ) || ( ! ( properties . containsKey ( Property . ErraiVersion . getName ( ) ) ) ) ) || ( ! ( properties . get ( Property . ErraiVersion . getName ( ) ) . equals ( getErraiVersion ( ) ) ) ) ) ; }
org . junit . Assert . assertTrue ( testFacet . isInstalled ( ) )
testGetValueSnak ( ) { org . wikidata . wdtk . datamodel . implementation . ValueSnak o1 = new org . wikidata . wdtk . datamodel . implementation . ValueSnakImpl ( factory . getPropertyIdValue ( "P42" , "foo" ) , factory . getStringValue ( "foo" ) ) ; org . wikidata . wdtk . datamodel . implementation . ValueSnak o2 = factory . getValueSnak ( factory . getPropertyIdValue ( "P42" , "foo" ) , factory . getStringValue ( "foo" ) ) ; "<AssertPlaceHolder>" ; } getStringValue ( java . lang . String ) { return new org . wikidata . wdtk . datamodel . implementation . StringValueImpl ( string ) ; }
org . junit . Assert . assertEquals ( o1 , o2 )
shouldRejectTypeOnPut ( ) { host = new org . openstack . atlas . docs . loadbalancers . api . management . v1 . Host ( ) ; host . setIpv4Public ( "100.10.100.10" ) ; host . setType ( HostType . ACTIVE ) ; res = hv . validate ( host , org . openstack . atlas . api . mgmt . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ValidatorResult , java . lang . Enum ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ! ( result . passedValidation ( ) ) ) { java . util . List < org . openstack . atlas . api . validation . results . ExpectationResult > ers = result . getValidationResults ( ) ; sb . append ( java . lang . String . format ( "ON<sp>%s<sp>result.withMessage([" , ctx . toString ( ) ) ) ; for ( org . openstack . atlas . api . validation . results . ExpectationResult er : ers ) { sb . append ( java . lang . String . format ( "%s" , er . getMessage ( ) ) ) ; sb . append ( "])" ) ; } } else { sb . append ( java . lang . String . format ( "On<sp>%s<sp>All<sp>Expectations<sp>PASSED\n" , ctx . toString ( ) ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertFalse ( resultMessage ( res , org . openstack . atlas . api . mgmt . validation . validators . PUT ) , res . passedValidation ( ) )
moveDirectoryToAnotherSystem_theTargetDirectoryShouldExist ( ) { initRepository ( ) ; writeToCache ( "/source/file.txt" ) ; commitToMaster ( ) ; initGitFileSystem ( ) ; com . beijunyi . parallelgit . filesystem . GitPath source = gfs . getPath ( "/source" ) ; com . beijunyi . parallelgit . filesystem . GitPath target = targetGfs . getPath ( "/target" ) ; java . nio . file . Files . move ( source , target ) ; "<AssertPlaceHolder>" ; } getPath ( java . net . URI ) { com . beijunyi . parallelgit . filesystem . GitFileSystem gfs = getFileSystem ( uri ) ; java . lang . String file = com . beijunyi . parallelgit . filesystem . utils . GfsUriUtils . getFile ( uri ) ; return gfs . getPath ( file ) . toRealPath ( ) ; }
org . junit . Assert . assertTrue ( java . nio . file . Files . exists ( target ) )
negate ( ) { "<AssertPlaceHolder>" ; } negate ( ) { org . junit . Assert . assertThat ( new jetbrains . jetpad . geometry . Vector ( 1 , 2 ) . negate ( ) , org . hamcrest . CoreMatchers . is ( new jetbrains . jetpad . geometry . Vector ( ( - 1 ) , ( - 2 ) ) ) ) ; }
org . junit . Assert . assertThat ( new jetbrains . jetpad . geometry . Vector ( 1 , 2 ) . negate ( ) , org . hamcrest . CoreMatchers . is ( new jetbrains . jetpad . geometry . Vector ( ( - 1 ) , ( - 2 ) ) ) )
shouldDeserialiseSourceDestinationValuesCorrectWayRound ( ) { final uk . gov . gchq . gaffer . data . element . Edge edge = new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . source ( "1" ) . dest ( "2" ) . directed ( true ) . group ( TestGroups . ENTITY ) . build ( ) ; final byte [ ] rowKey = converter . getRowKeysFromEdge ( edge ) . getFirst ( ) ; final byte [ ] [ ] sourceDestValues = new byte [ 2 ] [ ] ; final uk . gov . gchq . gaffer . data . element . EdgeDirection direction = converter . getSourceAndDestinationFromRowKey ( rowKey , sourceDestValues ) ; "<AssertPlaceHolder>" ; } getSourceAndDestinationFromRowKey ( byte [ ] , byte [ ] [ ] ) { final int [ ] positionsOfDelimiters = new int [ 3 ] ; short numDelims = 0 ; for ( int i = 0 ; i < ( ( rowKey . length ) - 1 ) ; ++ i ) { if ( ( rowKey [ i ] ) == ( uk . gov . gchq . gaffer . commonutil . ByteArrayEscapeUtils . DELIMITER ) ) { if ( numDelims >= 3 ) { throw new uk . gov . gchq . gaffer . accumulostore . key . exception . AccumuloElementConversionException ( "Too<sp>many<sp>delimiters<sp>found<sp>in<sp>row<sp>key<sp>-<sp>found<sp>more<sp>than<sp>the<sp>expected<sp>3." ) ; } positionsOfDelimiters [ ( numDelims ++ ) ] = i ; } } if ( numDelims != 3 ) { throw new uk . gov . gchq . gaffer . accumulostore . key . exception . AccumuloElementConversionException ( ( ( "Wrong<sp>number<sp>of<sp>delimiters<sp>found<sp>in<sp>row<sp>key<sp>-<sp>found<sp>" + numDelims ) + ",<sp>expected<sp>3." ) ) ; } byte directionFlag ; try { directionFlag = rowKey [ ( ( rowKey . length ) - 1 ) ] ; } catch ( final java . lang . NumberFormatException e ) { throw new uk . gov . gchq . gaffer . accumulostore . key . exception . AccumuloElementConversionException ( ( "Error<sp>parsing<sp>direction<sp>flag<sp>from<sp>row<sp>key<sp>-<sp>" + e ) ) ; } byte [ ] sourceBytes = uk . gov . gchq . gaffer . commonutil . ByteArrayEscapeUtils . unEscape ( rowKey , 0 , positionsOfDelimiters [ 0 ] ) ; byte [ ] destBytes = uk . gov . gchq . gaffer . commonutil . ByteArrayEscapeUtils . unEscape ( rowKey , ( ( positionsOfDelimiters [ 1 ] ) + 1 ) , positionsOfDelimiters [ 2 ] ) ; uk . gov . gchq . gaffer . data . element . EdgeDirection rtn ; sourceDestValues [ 0 ] = sourceBytes ; sourceDestValues [ 1 ] = destBytes ; switch ( directionFlag ) { case ByteEntityPositions . UNDIRECTED_EDGE : rtn = uk . gov . gchq . gaffer . data . element . EdgeDirection . UNDIRECTED ; break ; case ByteEntityPositions . CORRECT_WAY_DIRECTED_EDGE : rtn = uk . gov . gchq . gaffer . data . element . EdgeDirection . DIRECTED ; break ; case ByteEntityPositions . INCORRECT_WAY_DIRECTED_EDGE : sourceDestValues [ 0 ] = destBytes ; sourceDestValues [ 1 ] = sourceBytes ; rtn = uk . gov . gchq . gaffer . data . element . EdgeDirection . DIRECTED_REVERSED ; break ; default : throw new uk . gov . gchq . gaffer . accumulostore . key . exception . AccumuloElementConversionException ( ( "Invalid<sp>direction<sp>flag<sp>in<sp>row<sp>key<sp>-<sp>flag<sp>was<sp>" + directionFlag ) ) ; } return rtn ; }
org . junit . Assert . assertEquals ( EdgeDirection . DIRECTED , direction )
solve_07 ( ) { java . lang . String x = "(sequence<sp>(table<sp>(vars<sp>?X)<sp>(row<sp>[?X<sp>'NotPresent']))<sp>(bgp<sp>(triple<sp>:s<sp>:p<sp>?o)))" ; org . apache . jena . tdb2 . solver . ResultSet rs1 = org . apache . jena . tdb2 . solver . TestSolverTDB . exec ( x ) ; "<AssertPlaceHolder>" ; org . apache . jena . tdb2 . solver . ResultSetFormatter . consume ( rs1 ) ; } hasNext ( ) { return iter . hasNext ( ) ; }
org . junit . Assert . assertTrue ( rs1 . hasNext ( ) )
firstTest ( ) { com . microsoft . azure . management . storage . v2017_10_01 . StorageTest . rgName = com . microsoft . azure . arm . utils . SdkContext . randomResourceName ( "rg" , 20 ) ; com . microsoft . azure . management . resources . ResourceGroup group = com . microsoft . azure . management . storage . v2017_10_01 . StorageTest . resourceManager . resourceGroups ( ) . define ( com . microsoft . azure . management . storage . v2017_10_01 . StorageTest . rgName ) . withRegion ( Region . US_WEST . toString ( ) ) . create ( ) ; "<AssertPlaceHolder>" ; } create ( ) { return this . create ( null , null , null , null ) ; }
org . junit . Assert . assertNotNull ( group )
test_update_by_filter ( ) { final org . nutz . dao . test . meta . Pet p = dao . fetch ( org . nutz . dao . test . meta . Pet . class , "xb" ) ; p . setNickName ( "XiaoBai" ) ; org . nutz . dao . FieldFilter . create ( org . nutz . dao . test . meta . Pet . class , "id|name" ) . run ( new org . nutz . trans . Atom ( ) { public void run ( ) { dao . update ( p ) ; } } ) ; org . nutz . dao . test . meta . Pet p2 = dao . fetch ( org . nutz . dao . test . meta . Pet . class , p . getId ( ) ) ; "<AssertPlaceHolder>" ; } getNickName ( ) { return nickName ; }
org . junit . Assert . assertNull ( p2 . getNickName ( ) )
testRenameFileRenameDir ( ) { final com . intellij . openapi . vfs . VirtualFile child = prepareDirectoriesForRename ( ) ; final com . intellij . openapi . vfs . VirtualFile f = child . findChild ( "a.txt" ) ; renameFileInCommand ( f , "a.txt" 0 ) ; renameFileInCommand ( child , "newchild" ) ; verifySorted ( runSvn ( "status" ) , "A<sp>+<sp>newchild" , "a.txt" 1 , "D<sp>child" , "D<sp>child\\a.txt" , "D<sp>child\\grandChild" , "D<sp>child\\grandChild\\b.txt" , "D<sp>+<sp>newchild\\a.txt" ) ; final com . intellij . openapi . vcs . changes . ChangeListManager changeListManager = com . intellij . openapi . vcs . changes . ChangeListManager . getInstance ( myProject ) ; com . intellij . openapi . vfs . LocalFileSystem . getInstance ( ) . refresh ( false ) ; changeListManager . ensureUpToDate ( false ) ; final java . util . List < com . intellij . openapi . vcs . changes . Change > changes = new java . util . ArrayList < com . intellij . openapi . vcs . changes . Change > ( changeListManager . getDefaultChangeList ( ) . getChanges ( ) ) ; final java . util . List < com . intellij . openapi . vcs . VcsException > list = org . jetbrains . idea . svn . SvnVcs . getInstance ( myProject ) . getCheckinEnvironment ( ) . commit ( changes , "test" ) ; "<AssertPlaceHolder>" ; } size ( ) { return myInfos . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , list . size ( ) )
testServiceRegistrationInvokesServiceTrackerMapListener ( ) { final java . util . Collection < com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne > trackedOnes = new java . util . ArrayList ( ) ; com . liferay . osgi . service . tracker . collections . map . ServiceTrackerMapListener < java . lang . String , com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne , java . util . List < com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne > > serviceTrackerMapListener = new com . liferay . osgi . service . tracker . collections . map . ServiceTrackerMapListener < java . lang . String , com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne , java . util . List < com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne > > ( ) { @ com . liferay . osgi . service . tracker . collections . map . test . Override public void keyEmitted ( com . liferay . osgi . service . tracker . collections . map . ServiceTrackerMap < java . lang . String , java . util . List < com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne > > serviceTrackerMap , java . lang . String key , com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne serviceTrackedOne , java . util . List < com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne > contentTrackedOnes ) { trackedOnes . add ( serviceTrackedOne ) ; } @ com . liferay . osgi . service . tracker . collections . map . test . Override public void keyRemoved ( com . liferay . osgi . service . tracker . collections . map . ServiceTrackerMap < java . lang . String , java . util . List < com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne > > serviceTrackerMap , java . lang . String key , com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne serviceTrackedOne , java . util . List < com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne > contentTrackedOnes ) { } } ; _serviceTrackerMap = createServiceTrackerMap ( serviceTrackerMapListener ) ; org . osgi . framework . ServiceRegistration < com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne > serviceRegistration = null ; try { serviceRegistration = registerService ( new com . liferay . osgi . service . tracker . collections . internal . map . TrackedOne ( ) ) ; "<AssertPlaceHolder>" ; } finally { if ( serviceRegistration != null ) { serviceRegistration . unregister ( ) ; } } } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( trackedOnes . toString ( ) , 1 , trackedOnes . size ( ) )
getOperationParameterValues_NoRequestRequired ( ) { org . oscm . domobjects . TechnicalProductOperation tpo = createTechnicalProductOperation ( "op1" , org . oscm . applicationservice . bean . INPUT_STRING ) ; org . oscm . domobjects . Subscription sub = createSubscription ( false ) ; java . util . Map < java . lang . String , java . util . List < java . lang . String > > result = am . getOperationParameterValues ( org . oscm . applicationservice . bean . ApplicationServiceBeanTest . USER_ID , tpo , sub ) ; "<AssertPlaceHolder>" ; verifyZeroInteractions ( operationPort ) ; } isEmpty ( ) { return false ; }
org . junit . Assert . assertTrue ( result . isEmpty ( ) )
ComplexProperty ( ) { java . lang . String testENTITY = "testEntity" ; org . odata4j . edm . EdmEntityType . Builder entityType = EntityType ( testENTITY ) ; java . util . List < org . odata4j . edm . EdmComplexType . Builder > cpBuilderList = new java . util . ArrayList < org . odata4j . edm . EdmComplexType . Builder > ( ) ; org . odata4j . edm . EdmComplexType . Builder ctBuilder = EntityTypecomplexProperty1 ( "newComplexType" , entityType ) ; org . odata4j . edm . EdmDataServices . Builder builder = org . odata4j . edm . EdmDataServices . newBuilder ( ) ; cpBuilderList . add ( ctBuilder ) ; ComplexTypesimpleProperty ( 50 , ctBuilder ) ; org . odata4j . edm . EdmComplexType . Builder targetComplexTypeBuilder = ComplexTypecomplexProperty ( 5 , "newComplexType2" , ctBuilder ) ; cpBuilderList . add ( targetComplexTypeBuilder ) ; org . odata4j . edm . EdmSchema . Builder schema = org . odata4j . edm . EdmSchema . newBuilder ( ) . addEntityTypes ( entityType ) . setNamespace ( com . fujitsu . dc . test . unit . core . model . impl . es . odata . PropertyLimitCheckerTest . NS ) . addComplexTypes ( cpBuilderList ) ; org . odata4j . edm . EdmDataServices metadata = builder . addSchemas ( schema ) . build ( ) ; com . fujitsu . dc . core . model . impl . es . doc . PropertyDocHandler handler = new com . fujitsu . dc . core . model . impl . es . doc . ComplexTypePropertyDocHandler ( ) ; org . json . simple . JSONObject staticFields = new org . json . simple . JSONObject ( ) ; staticFields . put ( "Type" , "newComplexType2" ) ; handler . setStaticFields ( staticFields ) ; java . util . Map < java . lang . String , java . lang . String > entityTypeMap = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; entityTypeMap . put ( "_ComplexType.Name_uniqueKey" , "newComplexType" ) ; handler . setEntityTypeMap ( entityTypeMap ) ; handler . setEntityTypeId ( "_uniqueKey" ) ; java . util . Map < java . lang . String , java . lang . Object > manyToOneKindMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; manyToOneKindMap . put ( ComplexType . EDM_TYPE_NAME , "_uniqueKey" ) ; handler . setManyToOnelinkId ( manyToOneKindMap ) ; com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker checker = new com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker ( metadata , handler ) ; java . util . List < com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError > errors = checker . checkPropertyLimits ( ) ; "<AssertPlaceHolder>" ; } checkPropertyLimits ( ) { java . util . List < com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError > result = new java . util . ArrayList < com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError > ( ) ; if ( null == ( metadata ) ) { return result ; } java . util . Iterator < org . odata4j . edm . EdmEntityType > iter = metadata . getEntityTypes ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { org . odata4j . edm . EdmEntityType target = iter . next ( ) ; checkPropertyLimitsForEntityTypeInternal ( result , target ) ; } java . util . Iterator < org . odata4j . edm . EdmComplexType > complexTypeIter = metadata . getComplexTypes ( ) . iterator ( ) ; while ( complexTypeIter . hasNext ( ) ) { int simplePropCount = 0 ; int complexPropCount = 0 ; org . odata4j . edm . EdmComplexType complexType = complexTypeIter . next ( ) ; for ( org . odata4j . edm . EdmProperty prop : complexType . getProperties ( ) ) { if ( prop . getName ( ) . startsWith ( "_" ) ) { continue ; } if ( prop . getType ( ) . isSimple ( ) ) { simplePropCount ++ ; } else { complexPropCount ++ ; } } if ( ( simpleMaxForOverAllLayers ) < simplePropCount ) { java . lang . String message = java . lang . String . format ( "Total<sp>property[%s]<sp>count<sp>exceeds<sp>the<sp>limit[%d]." , complexType . getName ( ) , simpleMaxForOverAllLayers ) ; com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . log . info ( message ) ; result . add ( new com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError ( complexType . getName ( ) , message ) ) ; } if ( ( complexMaxForOverallLayers ) < complexPropCount ) { java . lang . String message = java . lang . String . format ( "Total<sp>property[%s]<sp>count<sp>exceeds<sp>the<sp>limit[%d]." , complexType . getName ( ) , complexMaxForOverallLayers ) ; com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . log . info ( message ) ; result . add ( new com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError ( complexType . getName ( ) , message ) ) ; } } return result ; }
org . junit . Assert . assertEquals ( 1 , errors . size ( ) )
testTokens_matchesRegexp_simple ( ) { java . util . List < org . apache . ambari . server . api . predicate . Token > listTokens = new java . util . ArrayList ( ) ; listTokens . add ( new org . apache . ambari . server . api . predicate . Token ( Token . TYPE . RELATIONAL_OPERATOR_FUNC , ".matches(" ) ) ; listTokens . add ( new org . apache . ambari . server . api . predicate . Token ( Token . TYPE . PROPERTY_OPERAND , "StackConfigurations/property_type" ) ) ; listTokens . add ( new org . apache . ambari . server . api . predicate . Token ( Token . TYPE . VALUE_OPERAND , "(.*USER.*)|(.*GROUP.*)" ) ) ; listTokens . add ( new org . apache . ambari . server . api . predicate . Token ( Token . TYPE . BRACKET_CLOSE , ")" ) ) ; org . apache . ambari . server . api . predicate . QueryLexer lexer = new org . apache . ambari . server . api . predicate . QueryLexer ( ) ; org . apache . ambari . server . api . predicate . Token [ ] tokens = lexer . tokens ( "StackConfigurations/property_type.matches((.*USER.*)|(.*GROUP.*))" ) ; "<AssertPlaceHolder>" ; } size ( ) { java . util . Set < java . lang . String > nodes = new java . util . HashSet < java . lang . String > ( ) ; for ( org . apache . ambari . eventdb . model . WorkflowDag . WorkflowDagEntry entry : entries ) { nodes . add ( entry . getSource ( ) ) ; nodes . addAll ( entry . getTargets ( ) ) ; } return nodes . size ( ) ; }
org . junit . Assert . assertArrayEquals ( listTokens . toArray ( new org . apache . ambari . server . api . predicate . Token [ listTokens . size ( ) ] ) , tokens )
testSetZeroes3 ( ) { int [ ] [ ] matrix = new int [ ] [ ] { new int [ ] { - 1 } , new int [ ] { 2 } , new int [ ] { 3 } } ; t . setZeroes2 ( matrix ) ; "<AssertPlaceHolder>" ; } setZeroes2 ( int [ ] [ ] ) { if ( ( matrix == null ) || ( ( matrix . length ) == 0 ) ) { return ; } boolean rowHasZero = false ; boolean colHasZero = false ; for ( int i = 0 ; i < ( matrix [ 0 ] . length ) ; i ++ ) { if ( ( matrix [ 0 ] [ i ] ) == 0 ) { rowHasZero = true ; } } for ( int i = 0 ; i < ( matrix . length ) ; i ++ ) { if ( ( matrix [ i ] [ 0 ] ) == 0 ) { colHasZero = true ; } } for ( int i = 1 ; i < ( matrix . length ) ; i ++ ) { for ( int j = 1 ; j < ( matrix [ i ] . length ) ; j ++ ) { if ( ( matrix [ i ] [ j ] ) == 0 ) { matrix [ 0 ] [ j ] = 0 ; matrix [ i ] [ 0 ] = 0 ; } } } for ( int i = 1 ; i < ( matrix . length ) ; i ++ ) { for ( int j = 1 ; j < ( matrix [ i ] . length ) ; j ++ ) { if ( ( ( matrix [ i ] [ 0 ] ) == 0 ) || ( ( matrix [ 0 ] [ j ] ) == 0 ) ) { matrix [ i ] [ j ] = 0 ; } } } if ( rowHasZero ) { for ( int i = 0 ; i < ( matrix [ 0 ] . length ) ; i ++ ) { matrix [ 0 ] [ i ] = 0 ; } } if ( colHasZero ) { for ( int i = 0 ; i < ( matrix . length ) ; i ++ ) { matrix [ i ] [ 0 ] = 0 ; } } }
org . junit . Assert . assertArrayEquals ( new int [ ] { - 1 } , matrix [ 0 ] )
testGetMapforJsonStringNullString ( ) { java . util . Map < java . lang . String , java . lang . String > resultMap = org . apache . sqoop . util . SqoopJsonUtil . getMapforJsonString ( null ) ; "<AssertPlaceHolder>" ; } getMapforJsonString ( java . lang . String ) { org . apache . sqoop . util . SqoopJsonUtil . LOG . debug ( ( ( "Passed<sp>mapJsonStr<sp>::" + mapJsonStr ) + "<sp>to<sp>parse" ) ) ; final java . util . Map < java . lang . String , java . lang . String > result ; try { if ( org . apache . sqoop . util . SqoopJsonUtil . isEmptyJSON ( mapJsonStr ) ) { result = java . util . Collections . emptyMap ( ) ; } else { org . codehaus . jackson . map . ObjectMapper mapper = new org . codehaus . jackson . map . ObjectMapper ( ) ; result = mapper . readValue ( mapJsonStr , new org . codehaus . jackson . type . TypeReference < java . util . HashMap < java . lang . String , java . lang . String > > ( ) { } ) ; } return result ; } catch ( org . codehaus . jackson . JsonParseException e ) { org . apache . sqoop . util . SqoopJsonUtil . LOG . error ( ( ( "JsonParseException::<sp>Illegal<sp>json<sp>to<sp>parse<sp>into<sp>map<sp>:" + mapJsonStr ) + ( e . getMessage ( ) ) ) ) ; throw new java . lang . IllegalArgumentException ( ( ( "Illegal<sp>json<sp>to<sp>parse<sp>into<sp>map<sp>:" + mapJsonStr ) + ( e . getMessage ( ) ) ) , e ) ; } catch ( org . codehaus . jackson . map . JsonMappingException e ) { org . apache . sqoop . util . SqoopJsonUtil . LOG . error ( ( ( "JsonMappingException::<sp>Illegal<sp>json<sp>to<sp>parse<sp>into<sp>map<sp>:" + mapJsonStr ) + ( e . getMessage ( ) ) ) ) ; throw new java . lang . IllegalArgumentException ( ( ( "Illegal<sp>json<sp>to<sp>parse<sp>into<sp>map<sp>:" + mapJsonStr ) + ( e . getMessage ( ) ) ) , e ) ; } catch ( java . io . IOException e ) { org . apache . sqoop . util . SqoopJsonUtil . LOG . error ( ( ( "IOException<sp>while<sp>parsing<sp>json<sp>into<sp>map<sp>:" + mapJsonStr ) + ( e . getMessage ( ) ) ) ) ; throw new java . lang . IllegalArgumentException ( ( ( "IOException<sp>while<sp>parsing<sp>json<sp>into<sp>map<sp>:" + mapJsonStr ) + ( e . getMessage ( ) ) ) , e ) ; } }
org . junit . Assert . assertTrue ( resultMap . isEmpty ( ) )
testMalformedBrokenLineParsingInChinese ( ) { final java . lang . String [ ] expectedChineseLines = new java . lang . String [ ] { "" , "" , "我喜欢吃饭,“我觉得这个饭最好\n*蛋糕\n*包子\n*冰淇淋\n*啤酒“,他们都很好,我也很喜欢奶酪但它是不健康的" , "" } ; final java . lang . String chineseLines = tmpDir . copyResourceFileName ( "brokenChineseLines.csv" ) ; java . io . FileInputStream fileInputStream = null ; try { fileInputStream = new java . io . FileInputStream ( new java . io . File ( chineseLines ) ) ; final org . apache . crunch . io . text . csv . CSVLineReader csvLineReader = new org . apache . crunch . io . text . csv . CSVLineReader ( fileInputStream , CSVLineReader . DEFAULT_BUFFER_SIZE , CSVLineReader . DEFAULT_INPUT_FILE_ENCODING , '' , '' , '' , 5 ) ; for ( int i = 0 ; i < ( expectedChineseLines . length ) ; i ++ ) { final org . apache . hadoop . io . Text readText = new org . apache . hadoop . io . Text ( ) ; csvLineReader . readCSVLine ( readText ) ; "<AssertPlaceHolder>" ; } } finally { fileInputStream . close ( ) ; } } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( "Tuple3[" ) ; sb . append ( first ) . append ( "," ) . append ( second ) . append ( "," ) . append ( third ) ; return sb . append ( "]" ) . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedChineseLines [ i ] , readText . toString ( ) )
testRevisionsfromAuditJoinTable ( ) { org . jboss . as . test . integration . jpa . hibernate . envers . SLSBAudit slsbAudit = org . jboss . as . test . integration . jpa . hibernate . envers . AuditJoinTableoverOnetoManyJoinColumnTest . lookup ( "SLSBAudit" , org . jboss . as . test . integration . jpa . hibernate . envers . SLSBAudit . class ) ; org . jboss . as . test . integration . jpa . hibernate . envers . Customer c1 = slsbAudit . createCustomer ( "MADHUMITA" , "SADHUKHAN" , "WORK" , "+420" , "543789654" ) ; org . jboss . as . test . integration . jpa . hibernate . envers . Phone p1 = c1 . getPhones ( ) . get ( 1 ) ; p1 . setType ( "Emergency" ) ; slsbAudit . updatePhone ( p1 ) ; c1 . setSurname ( "Mondal" ) ; slsbAudit . updateCustomer ( c1 ) ; c1 . setFirstname ( "Steve" ) ; c1 . setSurname ( "Jobs" ) ; slsbAudit . updateCustomer ( c1 ) ; c1 . getPhones ( ) . remove ( p1 ) ; slsbAudit . updateCustomer ( c1 ) ; slsbAudit . deletePhone ( p1 ) ; "<AssertPlaceHolder>" ; testRevisionDatafromAuditJoinTable ( c1 , slsbAudit ) ; testRevisionTypefromAuditJoinTable ( c1 , slsbAudit ) ; testOtherFieldslikeForeignKeysfromAuditJoinTable ( c1 , slsbAudit ) ; } getPhones ( ) { return phones ; }
org . junit . Assert . assertEquals ( 1 , c1 . getPhones ( ) . size ( ) )
testExecuteCloudWatchPutUnderBachSize ( ) { java . util . List < org . sagebionetworks . cloudwatch . ProfileData > list = createTestData ( ( ( Consumer . MAX_BATCH_SIZE ) - 1 ) ) ; "<AssertPlaceHolder>" ; com . amazonaws . services . cloudwatch . model . PutMetricDataRequest batch0 = new com . amazonaws . services . cloudwatch . model . PutMetricDataRequest ( ) ; batch0 . setNamespace ( "namespace0" ) ; org . sagebionetworks . cloudwatch . ConsumerTest . addRangeToRequst ( list , 0 , list . size ( ) , batch0 ) ; for ( org . sagebionetworks . cloudwatch . ProfileData pd : list ) { consumer . addProfileData ( pd ) ; } consumer . executeCloudWatchPut ( ) ; verify ( mockClient , times ( 1 ) ) . putMetricData ( batch0 ) ; } createTestData ( int [ ] ) { java . util . List < org . sagebionetworks . cloudwatch . ProfileData > list = new java . util . ArrayList < org . sagebionetworks . cloudwatch . ProfileData > ( ) ; for ( int namespace = 0 ; namespace < ( array . length ) ; namespace ++ ) { for ( int name = 0 ; name < ( array [ namespace ] ) ; name ++ ) { org . sagebionetworks . cloudwatch . ProfileData pd = new org . sagebionetworks . cloudwatch . ProfileData ( ) ; pd . setName ( ( "name" + name ) ) ; pd . setNamespace ( ( "namespace" + namespace ) ) ; pd . setTimestamp ( new java . util . Date ( ) ) ; pd . setUnit ( "Count" ) ; pd . setValue ( ( ( ( double ) ( ( namespace * name ) + 1 ) ) + name ) ) ; list . add ( pd ) ; } } return list ; }
org . junit . Assert . assertNotNull ( list )
testFieldNull ( ) { com . tobedevoured . modelcitizen . model . Car car = modelFactory . createModel ( com . tobedevoured . modelcitizen . model . Car . class ) ; "<AssertPlaceHolder>" ; } getPassenger ( ) { return passenger ; }
org . junit . Assert . assertNull ( car . getPassenger ( ) )
qpeekEmpty ( ) { java . util . List < com . github . xetorthio . jedisque . Job > jobs = com . github . xetorthio . jedisque . JedisqueTest . q . qpeek ( com . github . xetorthio . jedisque . JedisqueTest . getQueueName ( ) , 2 ) ; "<AssertPlaceHolder>" ; } getQueueName ( ) { return java . util . UUID . randomUUID ( ) . toString ( ) ; }
org . junit . Assert . assertEquals ( jobs . size ( ) , 0 )
documentBuilder ( ) { org . exist . dom . memtree . DocumentBuilderReceiver receiver = new org . exist . dom . memtree . DocumentBuilderReceiver ( ) ; javax . xml . parsers . SAXParserFactory factory = org . exist . util . ExistSAXParserFactory . getSAXParserFactory ( ) ; factory . setNamespaceAware ( true ) ; org . xml . sax . XMLReader reader = factory . newSAXParser ( ) . getXMLReader ( ) ; reader . setContentHandler ( receiver ) ; reader . parse ( new org . xml . sax . InputSource ( new java . io . StringReader ( org . exist . dom . memtree . DOMTest . XML ) ) ) ; org . w3c . dom . Document doc = receiver . getDocument ( ) ; org . w3c . dom . Node node = doc . getFirstChild ( ) ; "<AssertPlaceHolder>" ; java . io . StringWriter writer = new java . io . StringWriter ( ) ; org . exist . util . serializer . DOMSerializer serializer = new org . exist . util . serializer . DOMSerializer ( writer , null ) ; serializer . serialize ( node ) ; writer . toString ( ) ; } getFirstChild ( ) { return null ; }
org . junit . Assert . assertNotNull ( node )
testEncode_Hybrid0 ( ) { java . lang . String xStr = "42" ; java . lang . String yStr = "42" ; int refLength = 1 ; byte [ ] exp = de . persosim . simulator . utils . HexString . toByteArray ( ( ( "06" + xStr ) + yStr ) ) ; java . math . BigInteger x = new java . math . BigInteger ( 1 , de . persosim . simulator . utils . HexString . toByteArray ( xStr ) ) ; java . math . BigInteger y = new java . math . BigInteger ( 1 , de . persosim . simulator . utils . HexString . toByteArray ( yStr ) ) ; java . security . spec . ECPoint ecPoint = new java . security . spec . ECPoint ( x , y ) ; "<AssertPlaceHolder>" ; } encode ( java . security . spec . ECPoint , int , byte ) { byte encodingIndicator ; byte [ ] pointEncoding ; byte [ ] xBytes = de . persosim . simulator . crypto . CryptoUtil . getProjectedRepresentation ( ecPoint , referenceLength , true ) ; byte [ ] yBytes = de . persosim . simulator . crypto . CryptoUtil . getProjectedRepresentation ( ecPoint , referenceLength , false ) ; boolean yBitSet = ecPoint . getAffineY ( ) . testBit ( 0 ) ; if ( encoding == ( de . persosim . simulator . crypto . CryptoUtil . ENCODING_COMPRESSED ) ) { if ( yBitSet ) { encodingIndicator = ( ( byte ) ( 3 ) ) ; } else { encodingIndicator = ( ( byte ) ( 2 ) ) ; } pointEncoding = xBytes ; } else { if ( encoding == ( de . persosim . simulator . crypto . CryptoUtil . ENCODING_UNCOMPRESSED ) ) { encodingIndicator = ( ( byte ) ( 4 ) ) ; } else { if ( encoding == ( de . persosim . simulator . crypto . CryptoUtil . ENCODING_HYBRID ) ) { if ( yBitSet ) { encodingIndicator = ( ( byte ) ( 7 ) ) ; } else { encodingIndicator = ( ( byte ) ( 6 ) ) ; } } else { throw new java . lang . IllegalArgumentException ( "unsupported<sp>encoding" ) ; } } pointEncoding = de . persosim . simulator . utils . Utils . concatByteArrays ( xBytes , yBytes ) ; } return de . persosim . simulator . utils . Utils . concatByteArrays ( new byte [ ] { encodingIndicator } , pointEncoding ) ; }
org . junit . Assert . assertArrayEquals ( exp , de . persosim . simulator . crypto . CryptoUtil . encode ( ecPoint , refLength , CryptoUtil . ENCODING_HYBRID ) )
testConfig ( ) { final com . spotify . styx . model . StyxConfig expectedConfig = com . spotify . styx . model . StyxConfig . newBuilder ( ) . globalEnabled ( true ) . globalDockerRunnerId ( "default" ) . build ( ) ; "<AssertPlaceHolder>" ; } config ( ) { final com . google . cloud . datastore . Entity entity = com . spotify . styx . storage . DatastoreStorage . asBuilderOrNew ( com . spotify . styx . storage . DatastoreStorage . getOpt ( datastore , com . spotify . styx . storage . DatastoreStorage . globalConfigKey ( datastore . newKeyFactory ( ) ) ) , com . spotify . styx . storage . DatastoreStorage . globalConfigKey ( datastore . newKeyFactory ( ) ) ) . build ( ) ; return entityToConfig ( entity ) ; }
org . junit . Assert . assertThat ( storage . config ( ) , org . hamcrest . Matchers . is ( expectedConfig ) )
testGetParametersWithDefaultEntityAndDisabledStatus ( ) { unit . setActive ( false ) ; org . lnu . is . domain . mark . scale . MarkScale entity = new org . lnu . is . domain . mark . scale . MarkScale ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "userGroups" , groups ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
shouldSerialize ( ) { final com . couchbase . client . java . document . RawJsonDocument serialized = serializer . call ( entity ) ; "<AssertPlaceHolder>" ; verify ( mapper ) . writerFor ( reference ) ; verify ( writer ) . writeValueAsString ( any ( ) ) ; } call ( com . couchbase . client . java . document . RawJsonDocument ) { try { final java . lang . String wrapped = org . apache . commons . lang3 . StringUtils . join ( com . github . jloisel . reactive . conversion . jackson . JacksonDeserializer . START_OBJECT , document . content ( ) , com . github . jloisel . reactive . conversion . jackson . JacksonDeserializer . END_OBJECT ) ; final com . github . jloisel . reactive . conversion . jackson . BeanWrapper < T > bean = mapper . reader ( reference ) . readValue ( wrapped ) ; return bean . getEntity ( ) ; } catch ( final java . io . IOException e ) { throw new com . github . jloisel . reactive . conversion . jackson . JacksonConversionException ( ( "Error<sp>while<sp>deserializing<sp>document<sp>id=" + ( document . id ( ) ) ) , e ) ; } }
org . junit . Assert . assertEquals ( com . couchbase . client . java . document . RawJsonDocument . class , serialized . getClass ( ) )
isEditableWhenTypeAndFocusOnResourceTypeWhenInTestingModeShouldReturnFalse ( ) { ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . Origin propertyDescriptorOrigin = ResourceEditProperty . Origin . TYPE ; ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty propertyMock = mock ( ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . class ) ; when ( propertyMock . getPropertyDescriptorOrigin ( ) ) . thenReturn ( propertyDescriptorOrigin ) ; editPropertiesTable . onChangedResourceType ( createResourceTypeWithId ( 1 ) ) ; editPropertiesTable . onChangedTestingMode ( true ) ; boolean isEditable = editPropertiesTable . isEditable ( propertyMock ) ; "<AssertPlaceHolder>" ; } isEditable ( ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty ) { boolean isEditable = false ; ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . Origin propertyDescriptorOrigin = property . getPropertyDescriptorOrigin ( ) ; switch ( propertyDescriptorOrigin ) { case INSTANCE : isEditable = isCurrentFocusOnResource ( ) ; break ; case TYPE : isEditable = ( isCurrentFocusOnResourceType ( ) ) && ( ! ( property . isDescriptorDefinedOnSuperResourceType ( ) ) ) ; break ; } if ( isTesting ( ) ) { return ( property . isTesting ( ) ) && isEditable ; } return isEditable ; }
org . junit . Assert . assertFalse ( isEditable )
ES_ADSADS ( ) { try { com . fujitsu . dc . core . model . impl . es . repair . AdsAccessor . initializedAds ( ) ; com . fujitsu . dc . core . model . impl . es . repair . RepairAds repair = com . fujitsu . dc . core . model . impl . es . repair . RepairAds . getInstance ( ) ; java . lang . StringBuilder sbuf = new java . lang . StringBuilder ( ) ; sbuf . append ( ( ( com . fujitsu . dc . core . DcCoreConfig . getEsUnitPrefix ( ) ) + "_anon\t" ) ) ; sbuf . append ( "ComplexTypeProperty\t" ) ; sbuf . append ( "odata-gsX3t2q3Qz6jdIn30fFMaQ\t" ) ; sbuf . append ( "aCUuueHzTKCPchE0yxTZZA\t" ) ; sbuf . append ( ( ( id ) + "\t" ) ) ; sbuf . append ( "CREATE\t" ) ; sbuf . append ( "1\t" ) ; sbuf . append ( "1408595358931" ) ; com . fujitsu . dc . common . ads . AdsWriteFailureLogInfo logInfo = com . fujitsu . dc . common . ads . AdsWriteFailureLogInfo . parse ( sbuf . toString ( ) ) ; java . util . List < java . lang . String > list = new java . util . ArrayList < java . lang . String > ( ) ; list . add ( id ) ; com . fujitsu . dc . common . es . response . DcSearchResponse esResponse = com . fujitsu . dc . core . model . impl . es . repair . EsAccessor . search ( idxName , com . fujitsu . dc . test . unit . core . model . impl . es . repair . RepairAdsTest . ROUTING_ID , list , "UserData" ) ; java . util . List < org . json . simple . JSONObject > adsResponseBefore = com . fujitsu . dc . core . model . impl . es . repair . AdsAccessor . getIdListOnAds ( logInfo ) ; repair . repairToAds ( logInfo , esResponse , adsResponseBefore ) ; java . util . List < org . json . simple . JSONObject > adsResponseAfter = com . fujitsu . dc . core . model . impl . es . repair . AdsAccessor . getIdListOnAds ( logInfo ) ; "<AssertPlaceHolder>" ; } finally { ads . deleteEntity ( idxName , id ) ; } } getIdListOnAds ( com . fujitsu . dc . common . ads . AdsWriteFailureLogInfo ) { java . util . List < java . lang . String > idList = new java . util . ArrayList < java . lang . String > ( ) ; idList . add ( logInfo . getUuid ( ) ) ; java . lang . String indexName = logInfo . getIndexName ( ) ; java . lang . String type = logInfo . getType ( ) ; if ( Cell . EDM_TYPE_NAME . equals ( type ) ) { return com . fujitsu . dc . core . model . impl . es . repair . AdsAccessor . ads . searchCellList ( indexName , idList ) ; } else if ( "link" . equals ( type ) ) { return com . fujitsu . dc . core . model . impl . es . repair . AdsAccessor . ads . searchLinkList ( indexName , idList ) ; } else if ( "dav" . equals ( type ) ) { return com . fujitsu . dc . core . model . impl . es . repair . AdsAccessor . ads . searchDavNodeList ( indexName , idList ) ; } else { return com . fujitsu . dc . core . model . impl . es . repair . AdsAccessor . ads . searchEntityList ( indexName , idList ) ; } }
org . junit . Assert . assertEquals ( 1 , adsResponseAfter . size ( ) )
testConcat ( ) { java . lang . Iterable < java . lang . String > i1 = java . util . Arrays . asList ( "Hello" ) ; java . lang . Iterable < java . lang . String > i2 = java . util . Arrays . asList ( "<sp>" ) ; java . lang . Iterable < java . lang . String > i3 = java . util . Arrays . asList ( "World" ) ; java . lang . Iterable < java . lang . String > i4 = java . util . Arrays . asList ( "!" ) ; java . util . List < java . lang . String > result = new java . util . ArrayList < java . lang . String > ( ) ; for ( java . lang . String s : concat ( i1 , i2 , i3 , i4 ) ) { result . add ( s ) ; } "<AssertPlaceHolder>" ; } add ( E ) { return entries . add ( e ) ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "Hello" , "<sp>" , "World" , "!" ) , result )
store_1 ( ) { org . apache . jena . sdb . Store store = org . apache . jena . sdb . SDBFactory . connectStore ( ( ( org . apache . jena . sdb . test . misc . TestAssembler . dir ) + "store.ttl" ) ) ; "<AssertPlaceHolder>" ; } connectStore ( java . lang . String ) { return org . apache . jena . sdb . store . StoreFactory . create ( configFile ) ; }
org . junit . Assert . assertNotNull ( store )
testNcPropertiesNotNullOrEmpty_AllNotNullNotEmpty ( ) { boolean ncPropertiesNotNullOrEmpty = config . ncPropertiesNotNullOrEmpty ( config . getNamedCluster ( ) ) ; "<AssertPlaceHolder>" ; } getNamedCluster ( ) { org . pentaho . metastore . api . IMetaStore metaStore = metastoreLocator . getMetastore ( ) ; if ( metaStore == null ) { return null ; } java . lang . String queryParam = getQueryParam ( org . pentaho . big . data . api . jdbc . impl . JdbcUrlImpl . PENTAHO_NAMED_CLUSTER ) ; if ( queryParam == null ) { return null ; } return namedClusterService . read ( queryParam , metaStore ) ; }
org . junit . Assert . assertTrue ( ncPropertiesNotNullOrEmpty )
removeAllFromEmptyTargetListTest ( ) { com . gs . collections . api . list . MutableList < java . lang . Integer > sourceFastList = com . gs . collections . impl . list . mutable . FastList . newListWith ( 1 , 2 , 3 , 4 , 5 , 6 ) ; com . gs . collections . api . list . MutableList < java . lang . Integer > removeFastList = com . gs . collections . impl . list . mutable . FastList . newList ( ) ; com . gs . collections . impl . utility . Iterate . removeAllFrom ( removeFastList , sourceFastList ) ; "<AssertPlaceHolder>" ; } with ( K , V , K , V , K , V ) { return new com . gs . collections . impl . bimap . immutable . ImmutableHashBiMap < K , V > ( Maps . immutable . with ( key1 , value1 , key2 , value2 , key3 , value3 ) , Maps . immutable . with ( value1 , key1 , value2 , key2 , value3 , key3 ) ) ; }
org . junit . Assert . assertEquals ( Lists . immutable . with ( 1 , 2 , 3 , 4 , 5 , 6 ) , sourceFastList )