input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
forEachKey ( ) { super . forEachKey ( ) ; com . gs . collections . api . list . MutableList < java . lang . Integer > collection = Lists . mutable . of ( ) ; com . gs . collections . api . map . ImmutableMap < java . lang . Integer , java . lang . String > map = this . classUnderTest ( ) ; map . forEachKey ( com . gs . collections . impl . block . procedure . CollectionAddProcedure . on ( collection ) ) ; "<AssertPlaceHolder>" ; } newListWith ( E [ ] ) { return new com . gs . collections . impl . list . mutable . FastList < E > ( elements ) ; } | org . junit . Assert . assertEquals ( com . gs . collections . impl . list . mutable . FastList . newListWith ( 1 ) , collection ) |
testPutConflict ( ) { edu . ucla . sspace . util . HashMultiMap < java . lang . String , java . lang . String > m = new edu . ucla . sspace . util . HashMultiMap < java . lang . String , java . lang . String > ( ) ; m . put ( "a" , "1" ) ; m . put ( "a" , "2" ) ; java . util . Set < java . lang . String > s = m . get ( "a" ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { if ( o instanceof edu . ucla . sspace . util . Pair ) { @ edu . ucla . sspace . util . SuppressWarnings ( "unchecked" ) edu . ucla . sspace . util . Pair < T > p = ( ( edu . ucla . sspace . util . Pair < T > ) ( o ) ) ; return ( getCount ( p ) ) > 0 ; } return false ; } | org . junit . Assert . assertTrue ( s . contains ( "2" ) ) |
shouldPrioritiseFasterTestsThatDirectlyTestTargetBeforeSlowerTestsThatDirectlyTestTarget ( ) { final org . pitest . coverage . TestInfo reallySlow = testInfo ( 2000 , org . pitest . mutationtest . build . TestInfoPriorisationComparatorTest . TARGET ) ; final org . pitest . coverage . TestInfo slow = testInfo ( 2 , org . pitest . mutationtest . build . TestInfoPriorisationComparatorTest . TARGET ) ; final org . pitest . coverage . TestInfo fast = testInfo ( 1 , org . pitest . mutationtest . build . TestInfoPriorisationComparatorTest . TARGET ) ; final java . util . List < org . pitest . coverage . TestInfo > actual = sortWithTestee ( slow , reallySlow , fast ) ; "<AssertPlaceHolder>" ; } testInfo ( int , java . lang . String ) { return testInfo ( time , target , 0 ) ; } | org . junit . Assert . assertThat ( actual , org . hamcrest . core . Is . is ( java . util . Arrays . asList ( fast , slow , reallySlow ) ) ) |
testEmptyStringFieldNonMatch ( ) { java . lang . String fieldName = "sampleField" ; org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setField ( fieldName ) ; rule . setType ( StreamRuleType . PRESENCE ) ; rule . setInverted ( false ) ; org . graylog2 . plugin . Message message = getSampleMessage ( ) ; message . addField ( fieldName , "" ) ; org . graylog2 . streams . matchers . StreamRuleMatcher matcher = getMatcher ( rule ) ; java . lang . Boolean result = matcher . match ( message , rule ) ; "<AssertPlaceHolder>" ; } match ( org . graylog2 . plugin . Message , org . graylog2 . plugin . streams . StreamRule ) { java . lang . Double msgVal = getDouble ( msg . getField ( rule . getField ( ) ) ) ; if ( msgVal == null ) { return false ; } java . lang . Double ruleVal = getDouble ( rule . getValue ( ) ) ; if ( ruleVal == null ) { return false ; } return ( rule . getInverted ( ) ) ^ ( msgVal > ruleVal ) ; } | org . junit . Assert . assertFalse ( result ) |
testForVarcharArrayWith1ElementInLargerBuffer ( ) { java . lang . String [ ] strArr = new java . lang . String [ 1 ] ; strArr [ 0 ] = "abx" ; org . apache . phoenix . schema . types . PhoenixArray arr = org . apache . phoenix . schema . types . PArrayDataType . instantiatePhoenixArray ( PVarchar . INSTANCE , strArr ) ; byte [ ] bytes = PVarcharArray . INSTANCE . toBytes ( arr ) ; byte [ ] moreBytes = new byte [ ( bytes . length ) + 20 ] ; for ( int i = 0 ; i < ( moreBytes . length ) ; i ++ ) { moreBytes [ i ] = ( ( byte ) ( - i ) ) ; } java . lang . System . arraycopy ( bytes , 0 , moreBytes , 10 , bytes . length ) ; org . apache . phoenix . schema . types . PhoenixArray resultArr = ( ( org . apache . phoenix . schema . types . PhoenixArray ) ( PVarcharArray . INSTANCE . toObject ( moreBytes , 10 , bytes . length ) ) ) ; "<AssertPlaceHolder>" ; } toObject ( java . lang . Object , org . apache . phoenix . schema . types . PDataType , org . apache . phoenix . schema . SortOrder ) { return toObject ( object , actualType ) ; } | org . junit . Assert . assertEquals ( arr , resultArr ) |
buildShouldWrapInCRestExceptionWhenFailure ( ) { java . lang . RuntimeException e = new java . lang . RuntimeException ( ) ; java . lang . RuntimeException expected = new java . lang . RuntimeException ( ) ; when ( proxyFactory . createProxy ( eq ( org . codegist . crest . DefaultCRestTest . TestInterface . class . getClassLoader ( ) ) , isA ( org . codegist . common . reflect . InvocationHandler . class ) , eq ( new java . lang . Class [ ] { org . codegist . crest . DefaultCRestTest . TestInterface . class } ) ) ) . thenThrow ( e ) ; mockStatic ( org . codegist . crest . CRestException . class ) ; when ( org . codegist . crest . CRestException . handle ( e ) ) . thenReturn ( expected ) ; try { toTest . build ( org . codegist . crest . DefaultCRestTest . TestInterface . class ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e1 ) { "<AssertPlaceHolder>" ; } } build ( org . codegist . crest . CRestBuilder ) { return new org . codegist . crest . deserialization . jaxrs . CRestHolder ( builder . deserializeXmlWith ( org . codegist . crest . serializer . simplexml . SimpleXmlDeserializer . class ) . build ( ) , SIMPLEXML_SPECIFIC_PROPERTIES ) ; } | org . junit . Assert . assertSame ( expected , e1 ) |
testStargazersPersisting ( ) { when ( httpServletRequest . getRequestURL ( ) ) . thenReturn ( new java . lang . StringBuffer ( "http://localhost:8080/stargazersPerMonth" ) ) ; javax . servlet . Filter filter = filtersConfiguration . requestsStatisticAggregatorFilter ( ) ; filter . doFilter ( httpServletRequest , httpServletResponse , filterChain ) ; com . rhcloud . analytics4github . domain . RequestToAPI requestToAPI = this . repository . findByRepository ( com . rhcloud . analytics4github . config . FiltersConfigurationTest . PROJECT_NAME ) . get ( 0 ) ; "<AssertPlaceHolder>" ; this . repository . delete ( requestToAPI ) ; } getRepository ( ) { return repository ; } | org . junit . Assert . assertEquals ( requestToAPI . getRepository ( ) , com . rhcloud . analytics4github . config . FiltersConfigurationTest . PROJECT_NAME ) |
testHangs ( ) { java . lang . String script = "gm.setChangedBy(arguments.user.getFirstName()<sp>&<sp>\"<sp>\"<sp>&<sp>arguments.user.getMiddleInitial()<sp>&<sp>\"<sp>\"<sp>&<sp>arguments.user.getLastName()<sp>&<sp>\"<sp>[\"<sp>&<sp>arguments.user.getUserName()<sp>&<sp>\"]<sp>[\"<sp>&<sp>arguments.user.getEmail()<sp>&<sp>\"]\");" ; cfml . parsing . cfscript . script . CFScriptStatement scriptStatement = cfml . parsing . utils . TestUtils . parseScript ( script ) ; "<AssertPlaceHolder>" ; } parseScript ( java . lang . String ) { cfml . parsing . cfscript . script . CFScriptStatement scriptStatement = null ; cfml . parsing . CFMLParser fCfmlParser = new cfml . parsing . CFMLParser ( ) ; try { scriptStatement = fCfmlParser . parseScript ( script ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } return scriptStatement ; } | org . junit . Assert . assertNotNull ( scriptStatement ) |
select ( ) { victim . getChildren ( ) . stream ( ) . filter ( ( n ) -> n instanceof org . pdfsam . ui . dashboard . DashboardButton ) . map ( ( n ) -> ( ( org . pdfsam . ui . dashboard . DashboardButton ) ( n ) ) ) . noneMatch ( DashboardButton :: isSelected ) ; victim . setCurrentDashboardItem ( new org . pdfsam . ui . event . SetActiveDashboardItemRequest ( "id1" ) ) ; long selected = victim . getChildren ( ) . stream ( ) . filter ( ( n ) -> n instanceof org . pdfsam . ui . dashboard . DashboardButton ) . map ( ( n ) -> ( ( org . pdfsam . ui . dashboard . DashboardButton ) ( n ) ) ) . filter ( DashboardButton :: isSelected ) . count ( ) ; "<AssertPlaceHolder>" ; } setCurrentDashboardItem ( org . pdfsam . ui . event . SetActiveDashboardItemRequest ) { buttons . forEach ( ( b ) -> b . selectIf ( r . getActiveItemId ( ) ) ) ; } | org . junit . Assert . assertEquals ( 1 , selected ) |
testPingHandlerFailure ( ) { net . tomp2p . p2p . Peer sender = null ; net . tomp2p . p2p . Peer recv1 = null ; net . tomp2p . connection . ChannelCreator cc = null ; try { sender = new net . tomp2p . p2p . PeerBuilder ( new net . tomp2p . peers . Number160 ( "0x9876" ) ) . p2pId ( 55 ) . ports ( 2424 ) . start ( ) ; net . tomp2p . rpc . PingRPC handshake = new net . tomp2p . rpc . PingRPC ( sender . peerBean ( ) , sender . connectionBean ( ) , false , true , false ) ; recv1 = new net . tomp2p . p2p . PeerBuilder ( new net . tomp2p . peers . Number160 ( "0x1234" ) ) . p2pId ( 55 ) . ports ( 8088 ) . start ( ) ; new net . tomp2p . rpc . PingRPC ( recv1 . peerBean ( ) , recv1 . connectionBean ( ) , false , true , false ) ; net . tomp2p . futures . FutureChannelCreator fcc = recv1 . connectionBean ( ) . reservation ( ) . create ( 1 , 0 ) ; fcc . awaitUninterruptibly ( ) ; cc = fcc . channelCreator ( ) ; net . tomp2p . futures . FutureResponse fr = handshake . pingUDP ( recv1 . peerBean ( ) . serverPeerAddress ( ) , cc , new net . tomp2p . connection . DefaultConnectionConfiguration ( ) ) ; fr . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; } finally { if ( cc != null ) { cc . shutdown ( ) . await ( ) ; } if ( sender != null ) { sender . shutdown ( ) . await ( ) ; } if ( recv1 != null ) { recv1 . shutdown ( ) . await ( ) ; } } } isSuccess ( ) { if ( ! ( super . isSuccess ( ) ) ) { return false ; } return checkResults ( result ( ) , rawResult . size ( ) , dataSize ) ; } | org . junit . Assert . assertEquals ( false , fr . isSuccess ( ) ) |
primShortParamShouldHandleNull ( ) { create ( "primShortParam" ) . invoke ( mockController , context ) ; verify ( mockController ) . primShortParam ( ( ( short ) ( 0 ) ) ) ; "<AssertPlaceHolder>" ; } hasViolations ( ) { return ! ( this . violations . isEmpty ( ) ) ; } | org . junit . Assert . assertFalse ( validation . hasViolations ( ) ) |
testGetFloatingIPInfo ( java . lang . String ) { com . myjeeva . digitalocean . pojo . FloatingIP floatingIP = apiClient . getFloatingIPInfo ( "159.203.146.100" ) ; "<AssertPlaceHolder>" ; log . info ( floatingIP . toString ( ) ) ; } getFloatingIPInfo ( java . lang . String ) { checkBlankAndThrowError ( ipAddress , "Missing<sp>required<sp>parameter<sp>-<sp>ipAddress." ) ; java . lang . Object [ ] params = new java . lang . Object [ ] { ipAddress } ; return ( ( com . myjeeva . digitalocean . pojo . FloatingIP ) ( perform ( new com . myjeeva . digitalocean . impl . ApiRequest ( com . myjeeva . digitalocean . common . ApiAction . GET_FLOATING_IP_INFO , params ) ) . getData ( ) ) ) ; } | org . junit . Assert . assertNotNull ( floatingIP ) |
testDistanceContext ( ) { org . orbisgis . coremap . renderer . se . fill . HatchedFill hf = new org . orbisgis . coremap . renderer . se . fill . HatchedFill ( ) ; hf . setDistance ( new org . orbisgis . coremap . renderer . se . parameter . real . RealLiteral ( ( - 1 ) ) ) ; "<AssertPlaceHolder>" ; } getDistance ( ) { return distance ; } | org . junit . Assert . assertTrue ( ( ( hf . getDistance ( ) . getValue ( null , 1 ) ) == 0 ) ) |
testUploadRoundTripNullReponse ( ) { status . setJobState ( AsynchJobState . PROCESSING ) ; status . setResponseBody ( null ) ; org . sagebionetworks . repo . model . dbo . asynch . DBOAsynchJobStatus dbo = org . sagebionetworks . repo . model . dbo . asynch . AsynchJobStatusUtils . createDBOFromDTO ( status ) ; org . sagebionetworks . repo . model . asynch . AsynchronousJobStatus clone = org . sagebionetworks . repo . model . dbo . asynch . AsynchJobStatusUtils . createDTOFromDBO ( dbo ) ; "<AssertPlaceHolder>" ; } createDTOFromDBO ( org . sagebionetworks . repo . model . dbo . asynch . DBOAsynchJobStatus ) { org . sagebionetworks . repo . model . asynch . AsynchronousJobStatus dto = new org . sagebionetworks . repo . model . asynch . AsynchronousJobStatus ( ) ; try { org . sagebionetworks . repo . model . asynch . AsynchronousRequestBody asynchronousRequestBody = ( ( org . sagebionetworks . repo . model . asynch . AsynchronousRequestBody ) ( org . sagebionetworks . repo . model . jdo . JDOSecondaryPropertyUtils . decompressedObject ( dbo . getRequestBody ( ) , dbo . getJobType ( ) . name ( ) , dbo . getJobType ( ) . getRequestClass ( ) ) ) ) ; asynchronousRequestBody . setConcreteType ( asynchronousRequestBody . getClass ( ) . getName ( ) ) ; dto . setRequestBody ( asynchronousRequestBody ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } if ( ( dbo . getResponseBody ( ) ) != null ) { try { dto . setResponseBody ( ( ( org . sagebionetworks . repo . model . asynch . AsynchronousResponseBody ) ( org . sagebionetworks . repo . model . jdo . JDOSecondaryPropertyUtils . decompressedObject ( dbo . getResponseBody ( ) , dbo . getJobType ( ) . name ( ) , dbo . getJobType ( ) . getResponseClass ( ) ) ) ) ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } } dto . setChangedOn ( dbo . getChangedOn ( ) ) ; dto . setException ( dbo . getException ( ) ) ; dto . setErrorDetails ( dbo . getErrorDetails ( ) ) ; dto . setErrorMessage ( dbo . getErrorMessage ( ) ) ; dto . setEtag ( dbo . getEtag ( ) ) ; dto . setJobId ( dbo . getJobId ( ) . toString ( ) ) ; dto . setJobState ( org . sagebionetworks . repo . model . asynch . AsynchJobState . valueOf ( dbo . getJobState ( ) . name ( ) ) ) ; dto . setJobCanceling ( dbo . getCanceling ( ) ) ; dto . setProgressCurrent ( dbo . getProgressCurrent ( ) ) ; dto . setProgressTotal ( dbo . getProgressTotal ( ) ) ; dto . setProgressMessage ( dbo . getProgressMessage ( ) ) ; dto . setStartedByUserId ( dbo . getStartedByUserId ( ) ) ; dto . setStartedOn ( dbo . getStartedOn ( ) ) ; dto . setRuntimeMS ( dbo . getRuntimeMS ( ) ) ; return dto ; } | org . junit . Assert . assertEquals ( status , clone ) |
testMultipleInOneTurtle ( ) { try { java . net . URL url = new java . net . URL ( "http://example.com/" ) ; com . github . anno4j . io . ObjectParser objectParser = new com . github . anno4j . io . ObjectParser ( ) ; java . util . List < com . github . anno4j . model . Annotation > annotations = objectParser . parse ( com . github . anno4j . io . ObjectParserTest . TURTLE_MULTIPLE , url , RDFFormat . TURTLE , true ) ; "<AssertPlaceHolder>" ; for ( com . github . anno4j . model . Annotation anno : annotations ) { System . out . println ( anno . toString ( ) ) ; } objectParser . shutdown ( ) ; } catch ( java . io . IOException | org . openrdf . repository . RepositoryException | org . openrdf . repository . config . RepositoryConfigException e ) { e . printStackTrace ( ) ; } } size ( ) { try { if ( ( _size ) < 0 ) { synchronized ( this ) { if ( ( _size ) < 0 ) { int index = findSize ( ) ; _size = index ; } } } return _size ; } catch ( org . openrdf . repository . RepositoryException e ) { throw new org . openrdf . repository . object . exceptions . ObjectStoreException ( e ) ; } } | org . junit . Assert . assertEquals ( 3 , annotations . size ( ) ) |
testRondConverteerReisdocument ( ) { final nl . moderniseringgba . migratie . conversie . model . lo3 . Lo3PersoonslijstBuilder builder = maakLo3PersoonslijstBuilder ( ) ; voegReisdocumentToe ( builder ) ; final nl . moderniseringgba . migratie . conversie . model . lo3 . Lo3Persoonslijst lo3Persoonslijst = builder . build ( ) ; final nl . moderniseringgba . migratie . conversie . model . brp . BrpPersoonslijst brpPersoonslijst = conversieService . converteerLo3Persoonslijst ( lo3Persoonslijst ) ; final nl . moderniseringgba . migratie . conversie . model . lo3 . Lo3Persoonslijst lo3Terug = conversieService . converteerBrpPersoonslijst ( brpPersoonslijst ) ; "<AssertPlaceHolder>" ; } getReisdocumentStapels ( ) { return reisdocumentStapels ; } | org . junit . Assert . assertEquals ( lo3Persoonslijst . getReisdocumentStapels ( ) , lo3Terug . getReisdocumentStapels ( ) ) |
testUnalignedPeriodsOnEnd ( ) { System . out . println ( "Unaligned<sp>end<sp>floating<sp>rate<sp>payment." ) ; java . text . NumberFormat formatDec2 = new java . text . DecimalFormat ( "0.00" ) ; java . text . NumberFormat formatDec6 = new java . text . DecimalFormat ( "0.000000" ) ; java . text . NumberFormat formatSci2 = new java . text . DecimalFormat ( "0.00E00" ) ; net . finmath . time . TimeDiscretizationInterface liborPeriodDiscretization = liborMarketModel . getLiborPeriodDiscretization ( ) ; for ( int iPeriodStart = ( liborPeriodDiscretization . getNumberOfTimeSteps ( ) ) - 20 ; iPeriodStart < ( ( liborPeriodDiscretization . getNumberOfTimeSteps ( ) ) - 1 ) ; iPeriodStart ++ ) { double periodStart = liborPeriodDiscretization . getTime ( iPeriodStart ) ; double periodEnd = liborPeriodDiscretization . getTime ( ( iPeriodStart + 1 ) ) ; periodEnd -= ( ( liborPeriodDiscretization . getTime ( 4 ) ) - ( liborPeriodDiscretization . getTime ( 3 ) ) ) / 3 ; double periodLength = periodEnd - periodStart ; net . finmath . montecarlo . interestrate . products . indices . AbstractIndex index = new net . finmath . montecarlo . interestrate . products . indices . LIBORIndex ( 0.0 , periodLength ) ; net . finmath . montecarlo . interestrate . products . components . Period period = new net . finmath . montecarlo . interestrate . products . components . Period ( periodStart , periodEnd , periodStart , periodEnd , new net . finmath . montecarlo . interestrate . products . components . Notional ( 1.0 ) , index , periodLength , true , false , false ) ; double value = period . getValue ( liborMarketModel ) ; double valueAnalytic = ( ( liborMarketModel . getModel ( ) . getForwardRateCurve ( ) . getForward ( liborMarketModel . getModel ( ) . getAnalyticModel ( ) , periodStart , ( periodEnd - periodStart ) ) ) * ( liborMarketModel . getModel ( ) . getDiscountCurve ( ) . getDiscountFactor ( periodEnd ) ) ) * periodLength ; final double oneBasisPoint = ( 1.0 / 100.0 ) / 100.0 ; double toleranceThisTest = ( ( oneBasisPoint * ( volatilityScaling ) ) / ( java . lang . Math . sqrt ( ( ( liborMarketModel . getNumberOfPaths ( ) ) / 100000.0 ) ) ) ) + 1.0E-12 ; System . out . println ( ( ( ( ( ( ( ( formatDec2 . format ( periodStart ) ) + "\t" ) + ( formatDec2 . format ( periodEnd ) ) ) + "\t" ) + ( formatDec6 . format ( ( value - valueAnalytic ) ) ) ) + "\t<<sp>" ) + ( formatDec6 . format ( toleranceThisTest ) ) ) ) ; "<AssertPlaceHolder>" ; } System . out . println ( ) ; } getNumberOfPaths ( ) { return stochasticDriver . getNumberOfPaths ( ) ; } | org . junit . Assert . assertEquals ( valueAnalytic , value , toleranceThisTest ) |
testEqualsObject ( ) { byte [ ] aBytes = new byte [ ] { 12 , 56 , 100 , - 2 , - 76 , 89 , 45 , 91 , 3 , - 15 , 35 , 26 , 3 , 91 } ; int aSign = 1 ; java . math . BigInteger aNumber = new java . math . BigInteger ( aSign , aBytes ) ; java . lang . Object obj = new java . lang . Object ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( object instanceof org . teavm . classlib . java . text . TParsePosition ) ) { return false ; } org . teavm . classlib . java . text . TParsePosition pos = ( ( org . teavm . classlib . java . text . TParsePosition ) ( object ) ) ; return ( ( currentPosition ) == ( pos . currentPosition ) ) && ( ( errorIndex ) == ( pos . errorIndex ) ) ; } | org . junit . Assert . assertFalse ( aNumber . equals ( obj ) ) |
testHasMatchByIds_Success ( ) { gov . hhs . fha . nhinc . mpilib . PatientMatcher patientMatcher = createPatientMatcher ( ) ; gov . hhs . fha . nhinc . mpilib . Patient patient = createPatient ( ) ; addIdentifierToPatient ( patient , "12345" , "1.1" ) ; addIdentifierToPatient ( patient , "qwerty" , "2.2" ) ; gov . hhs . fha . nhinc . mpilib . Patient searchParams = new gov . hhs . fha . nhinc . mpilib . Patient ( ) ; addIdentifierToPatient ( searchParams , "qwerty" , "2.2" ) ; "<AssertPlaceHolder>" ; } hasMatchByIds ( gov . hhs . fha . nhinc . mpilib . Patient , gov . hhs . fha . nhinc . mpilib . Patient ) { for ( gov . hhs . fha . nhinc . mpilib . Identifier possibleMatchIdentifier : possibleMatch . getIdentifiers ( ) ) { if ( searchParams . getIdentifiers ( ) . contains ( possibleMatchIdentifier ) ) { return true ; } } return false ; } | org . junit . Assert . assertTrue ( patientMatcher . hasMatchByIds ( patient , searchParams ) ) |
testCeilTimestampInWhere ( ) { java . sql . Connection conn = java . sql . DriverManager . getConnection ( getUrl ( ) ) ; java . sql . ResultSet rs = conn . createStatement ( ) . executeQuery ( "SELECT<sp>*<sp>FROM<sp>ROUND_DATE_TIME_TS_DECIMAL<sp>WHERE<sp>CEIL(ts,<sp>'second')<sp>=<sp>to_date('2012-01-01<sp>14:25:29')" ) ; "<AssertPlaceHolder>" ; } next ( ) { if ( ! ( hasNext ( ) ) ) { throw new com . salesforce . phoenix . expression . visitor . NoSuchElementException ( ) ; } return children . get ( ( ( position ) ++ ) ) ; } | org . junit . Assert . assertTrue ( rs . next ( ) ) |
testFindOneTarget ( ) { io . katharsis . jpa . model . TestEntity test = addTestWithOneRelation ( ) ; io . katharsis . repository . RelationshipRepositoryV2 < io . katharsis . jpa . model . TestEntity , java . io . Serializable , io . katharsis . jpa . model . RelatedEntity , java . io . Serializable > relRepo = client . getQuerySpecRepository ( io . katharsis . jpa . model . TestEntity . class , io . katharsis . jpa . model . RelatedEntity . class ) ; io . katharsis . jpa . model . RelatedEntity related = relRepo . findOneTarget ( test . getId ( ) , TestEntity . ATTR_oneRelatedValue , new io . katharsis . queryspec . QuerySpec ( io . katharsis . jpa . model . RelatedEntity . class ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertNotNull ( related ) |
testComputeRoutesWithNextHopIpArpFalse ( ) { java . lang . String c1 = "c1" ; java . lang . String v1 = "v1" ; java . lang . String i1 = "i1" ; org . batfish . datamodel . AbstractRoute r1 = org . batfish . datamodel . StaticRoute . builder ( ) . setNetwork ( org . batfish . datamodel . ForwardingAnalysisImplTest . P1 ) . setNextHopIp ( org . batfish . datamodel . ForwardingAnalysisImplTest . P2 . getStartIp ( ) ) . setAdministrativeCost ( 1 ) . build ( ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . util . Set < org . batfish . datamodel . AbstractRoute > > > > routesWithNextHop = com . google . common . collect . ImmutableMap . of ( c1 , com . google . common . collect . ImmutableMap . of ( v1 , com . google . common . collect . ImmutableMap . of ( i1 , com . google . common . collect . ImmutableSet . of ( r1 ) ) ) ) ; org . batfish . datamodel . AbstractRoute ifaceRoute = new org . batfish . datamodel . ConnectedRoute ( org . batfish . datamodel . ForwardingAnalysisImplTest . P2 , i1 ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , org . batfish . datamodel . Fib > > fibs = com . google . common . collect . ImmutableMap . of ( c1 , com . google . common . collect . ImmutableMap . of ( v1 , org . batfish . datamodel . MockFib . builder ( ) . setNextHopInterfaces ( com . google . common . collect . ImmutableMap . of ( r1 , com . google . common . collect . ImmutableMap . of ( i1 , com . google . common . collect . ImmutableMap . of ( r1 . getNextHopIp ( ) , com . google . common . collect . ImmutableSet . of ( ifaceRoute ) ) ) ) ) . build ( ) ) ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , org . batfish . datamodel . IpSpace > > someoneReplies = com . google . common . collect . ImmutableMap . of ( c1 , com . google . common . collect . ImmutableMap . of ( i1 , org . batfish . datamodel . ForwardingAnalysisImplTest . P2 . getEndIp ( ) . toIpSpace ( ) ) ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . util . Set < org . batfish . datamodel . AbstractRoute > > > > result = org . batfish . datamodel . ForwardingAnalysisImpl . computeRoutesWithNextHopIpArpFalse ( fibs , routesWithNextHop , someoneReplies ) ; "<AssertPlaceHolder>" ; } of ( java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { return org . batfish . datamodel . Edge . create ( tailNode , tailInterface , headNode , headInterface ) ; } | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( com . google . common . collect . ImmutableMap . of ( c1 , com . google . common . collect . ImmutableMap . of ( v1 , com . google . common . collect . ImmutableMap . of ( i1 , com . google . common . collect . ImmutableSet . of ( r1 ) ) ) ) ) ) |
testCacheKey ( ) { final org . apache . druid . query . dimension . DimensionSpec spec = new org . apache . druid . query . dimension . DefaultDimensionSpec ( "foo" , "foo" , org . apache . druid . segment . column . ValueType . FLOAT ) ; final byte [ ] expected = new byte [ ] { 0 , 7 , 102 , 111 , 111 , 7 , 70 , 76 , 79 , 65 , 84 } ; "<AssertPlaceHolder>" ; } getCacheKey ( ) { final org . apache . druid . query . cache . CacheKeyBuilder builder = new org . apache . druid . query . cache . CacheKeyBuilder ( org . apache . druid . query . aggregation . post . PostAggregatorIds . MOMENTS_SKETCH_TO_MAX_CACHE_TYPE_ID ) . appendCacheable ( field ) ; return builder . build ( ) ; } | org . junit . Assert . assertArrayEquals ( expected , spec . getCacheKey ( ) ) |
shouldRaiseMusicGenreLowerCase ( ) { org . agoncal . book . javaee7 . chapter03 . ex10 . CD10 cd = new org . agoncal . book . javaee7 . chapter03 . ex10 . CD10 ( "St<sp>Pepper" , 12.8F , "Beatles<sp>master<sp>piece" , "Apple" , 11 , 53.32F , "pop" ) ; java . util . Set < javax . validation . ConstraintViolation < org . agoncal . book . javaee7 . chapter03 . ex10 . CD10 > > violations = org . agoncal . book . javaee7 . chapter03 . ex10 . CD10Test . validator . validate ( cd ) ; displayContraintViolations ( violations ) ; "<AssertPlaceHolder>" ; } displayContraintViolations ( java . util . Set ) { for ( org . agoncal . book . javaee7 . chapter03 . ex12 . ConstraintViolation constraintViolation : constraintViolations ) { System . out . println ( ( ( ( ( ( ( ( "###<sp>" + ( constraintViolation . getRootBeanClass ( ) . getSimpleName ( ) ) ) + "." ) + ( constraintViolation . getPropertyPath ( ) ) ) + "<sp>-<sp>Invalid<sp>Value<sp>=<sp>" ) + ( constraintViolation . getInvalidValue ( ) ) ) + "<sp>-<sp>Error<sp>Msg<sp>=<sp>" ) + ( constraintViolation . getMessage ( ) ) ) ) ; } } | org . junit . Assert . assertEquals ( 2 , violations . size ( ) ) |
testParallelMapThenMap ( ) { org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroup ( ) ; group . defineTemplate ( "bold" , "x" , "[<x>]" ) ; group . defineTemplate ( "test" , "names,phones" , "x5001" 3 ) ; org . stringtemplate . v4 . ST st = group . getInstanceOf ( "test" ) ; st . add ( "names" , "x5001" 0 ) ; st . add ( "names" , "Tom" ) ; st . add ( "names" , "x5001" 2 ) ; st . add ( "phones" , "x5001" ) ; st . add ( "phones" , "x5002" ) ; java . lang . String expected = "x5001" 1 ; java . lang . String result = st . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; } | org . junit . Assert . assertEquals ( expected , result ) |
testDate ( ) { java . text . SimpleDateFormat formatter = new java . text . SimpleDateFormat ( "yyyy-MM-dd<sp>HH:mm:ss" ) ; java . text . ParsePosition pos = new java . text . ParsePosition ( 0 ) ; java . util . Date date = formatter . parse ( "2012-12-21<sp>23:59:59" , pos ) ; java . util . Date result = executeBackAndForth ( date , java . util . Date . class ) ; java . text . SimpleDateFormat formatter1 = new java . text . SimpleDateFormat ( "yyyy-MM-dd<sp>HH:mm:ss" ) ; "<AssertPlaceHolder>" ; } executeBackAndForth ( java . lang . Object , com . jd . dd . glowworm . util . Parameters ) { java . lang . Object result = null ; if ( isForFunctionality ) { byte [ ] bytes = com . jd . dd . glowworm . PB . toPBBytes ( obj , parameters ) ; result = com . jd . dd . glowworm . PB . parsePBBytes ( bytes , parameters ) ; return result ; } else { if ( needCompareWithFastJSON ) { return compareWithFastJSON ( obj , parameters ) ; } else { if ( ! ( isFirstExecutation ) ) { for ( int i = preHeatTimes ; i > 0 ; i -- ) { com . jd . dd . glowworm . PB . parsePBBytes ( com . jd . dd . glowworm . PB . toPBBytes ( obj , parameters ) , parameters ) ; } isFirstExecutation = true ; } java . lang . Long start = java . lang . System . currentTimeMillis ( ) ; for ( int i = 0 ; i < ( runTimes ) ; i ++ ) { result = com . jd . dd . glowworm . PB . parsePBBytes ( com . jd . dd . glowworm . PB . toPBBytes ( obj , parameters ) , parameters ) ; } java . lang . Long end = java . lang . System . currentTimeMillis ( ) ; testcase . TestBase . logger . info ( "+{}<sp>{}<sp><sp>{}ms" , new java . lang . Object [ ] { result . getClass ( ) . getSimpleName ( ) , result . toString ( ) , end - start } ) ; return result ; } } } | org . junit . Assert . assertEquals ( "2012-12-21<sp>23:59:59" , formatter1 . format ( result ) ) |
testGetObjectCount ( ) { when ( mockRepo . login ( ) ) . thenReturn ( mockSession ) ; when ( mockSession . getWorkspace ( ) ) . thenReturn ( mockWorkspace ) ; when ( mockWorkspace . getQueryManager ( ) ) . thenReturn ( mockQueryManager ) ; when ( mockQueryManager . createQuery ( ( ( ( ( "SELECT<sp>[" + ( JCR_PATH ) ) + "]<sp>FROM<sp>[" ) + ( FEDORA_CONTAINER ) ) + "]" ) , org . fcrepo . kernel . modeshape . services . JCR_SQL2 ) ) . thenReturn ( mockQuery ) ; when ( mockQuery . execute ( ) ) . thenReturn ( mockQueryResult ) ; when ( mockQueryResult . getRows ( ) ) . thenReturn ( mockRowIterator ) ; when ( mockRowIterator . getSize ( ) ) . thenReturn ( 3L ) ; final long count = testObj . getRepositoryObjectCount ( ) ; "<AssertPlaceHolder>" ; verify ( mockSession ) . logout ( ) ; verify ( mockSession , never ( ) ) . save ( ) ; } getRepositoryObjectCount ( ) { final javax . jcr . Repository repo = org . fcrepo . kernel . modeshape . FedoraRepositoryImpl . getJcrRepository ( repository ) ; try { return org . fcrepo . kernel . modeshape . services . ServiceHelpers . getRepositoryCount ( repo ) ; } catch ( final javax . jcr . RepositoryException e ) { throw new org . fcrepo . kernel . api . exception . RepositoryRuntimeException ( e ) ; } } | org . junit . Assert . assertEquals ( 3L , count ) |
testClassesPrivateConstructor ( ) { for ( final java . lang . Class < T > classToTest : classesWithPrivateConstructors ) { org . pmw . tinylog . Logger . info ( ( "Testing<sp>private<sp>constructor<sp>for:<sp>" + ( classToTest . getName ( ) ) ) ) ; final java . lang . reflect . Constructor < T > constructor = classToTest . getDeclaredConstructor ( new java . lang . Class [ 0 ] ) ; constructor . setAccessible ( true ) ; final T createdObject = constructor . newInstance ( new java . lang . Object [ 0 ] ) ; "<AssertPlaceHolder>" ; } } getName ( ) { return name ; } | org . junit . Assert . assertNotNull ( createdObject ) |
listItemRecurseWorksWithNonTopLevelItems ( ) { mockStatic ( hudson . model . Items . class ) ; mockStatic ( hudson . views . ListViewColumn . class ) ; java . util . List < hudson . views . ListViewColumn > columns = java . util . Collections . emptyList ( ) ; when ( hudson . views . ListViewColumn . createDefaultInitialColumnList ( hudson . model . ListView . class ) ) . thenReturn ( columns ) ; hudson . model . ViewGroup owner = mock ( hudson . model . ViewGroup . class ) ; hudson . model . ItemGroup itemGroupOwner = mock ( hudson . model . ItemGroup . class ) ; when ( owner . getItemGroup ( ) ) . thenReturn ( itemGroupOwner ) ; hudson . model . ListView lv = new hudson . model . ListView ( "test" , owner ) ; hudson . model . ListViewTest . ItemGroupOfNonTopLevelItem ig = org . mockito . Mockito . mock ( hudson . model . ListViewTest . ItemGroupOfNonTopLevelItem . class ) ; when ( hudson . model . Items . getAllItems ( eq ( itemGroupOwner ) , eq ( hudson . model . TopLevelItem . class ) ) ) . thenReturn ( java . util . Arrays . asList ( ( ( hudson . model . TopLevelItem ) ( ig ) ) ) ) ; when ( ig . getRelativeNameFrom ( any ( hudson . model . ItemGroup . class ) ) ) . thenReturn ( "test-item" ) ; lv . setRecurse ( true ) ; lv . add ( ig ) ; "<AssertPlaceHolder>" ; } getItems ( ) { return items ; } | org . junit . Assert . assertEquals ( 1 , lv . getItems ( ) . size ( ) ) |
debieraEliminarColegio ( ) { log . debug ( "Debiera<sp>eliminar<sp>colegio" ) ; mx . edu . um . mateo . colportor . model . ColegioColportor colegio = new mx . edu . um . mateo . colportor . model . ColegioColportor ( mx . edu . um . mateo . general . utils . Constantes . NOMBRE , mx . edu . um . mateo . general . utils . Constantes . STATUS_ACTIVO ) ; colegioDao . crea ( colegio ) ; "<AssertPlaceHolder>" ; this . mockMvc . perform ( post ( Constantes . PATH_COLEGIO_COLPORTOR_ELIMINA ) . param ( "id" , colegio . getId ( ) . toString ( ) ) ) . andExpect ( status ( ) . isOk ( ) ) . andExpect ( flash ( ) . attributeExists ( Constantes . CONTAINSKEY_MESSAGE ) ) . andExpect ( flash ( ) . attribute ( Constantes . CONTAINSKEY_MESSAGE , "colegio.eliminado.message" ) ) ; } crea ( mx . edu . um . mateo . contabilidad . model . CuentaMayor ) { return crea ( cuentaMayor , null ) ; } | org . junit . Assert . assertNotNull ( colegio ) |
testPartitionByBoolOrcTable ( ) { java . lang . String tablePath = ( com . splicemachine . derby . impl . sql . execute . operations . ExternalTableIT . getExternalResourceDirectory ( ) ) + "/PartitionByBoolOrc" ; methodWatcher . executeUpdate ( java . lang . String . format ( ( "create<sp>external<sp>table<sp>t_partition_by_bool<sp>(a1<sp>Boolean,<sp>b1<sp>int,<sp>c1<sp>varchar(10))" + ( "partitioned<sp>by<sp>(a1)" + "STORED<sp>AS<sp>ORC<sp>LOCATION<sp>'%s'" ) ) , tablePath ) ) ; methodWatcher . executeUpdate ( "insert<sp>into<sp>t_partition_by_bool<sp>values(NULL,<sp>1,<sp>'DDD')" ) ; java . sql . ResultSet rs = methodWatcher . executeQuery ( "select<sp>a1,<sp>count(*)<sp>from<sp>t_partition_by_bool<sp>group<sp>by<sp>a1<sp>order<sp>by<sp>1" ) ; java . lang . String expected = "A1<sp>|<sp>2<sp>|\n" + ( "----------\n" + "NULL<sp>|<sp>1<sp>|" ) ; java . lang . String resultString = TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; } | org . junit . Assert . assertEquals ( expected , resultString ) |
testWriteChar ( ) { java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; org . nucleus8583 . core . charset . spi . AsciiEncoder encoder = new org . nucleus8583 . core . charset . spi . AsciiEncoder ( out ) ; encoder . write ( 'a' ) ; encoder . flush ( ) ; "<AssertPlaceHolder>" ; } flush ( ) { out . flush ( ) ; } | org . junit . Assert . assertEquals ( "a" , new java . lang . String ( out . toByteArray ( ) ) ) |
hasManagerRole_PLATFORM_OPERATOR ( ) { org . oscm . domobjects . PlatformUser user = createUserWithRole ( UserRoleType . PLATFORM_OPERATOR ) ; "<AssertPlaceHolder>" ; } hasManagerRole ( ) { for ( org . oscm . domobjects . RoleAssignment roleAssignment : assignedRoles ) { if ( roleAssignment . getRole ( ) . getRoleName ( ) . isManagerRole ( ) ) return true ; } return false ; } | org . junit . Assert . assertTrue ( user . hasManagerRole ( ) ) |
testFailOne ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( false ) |
testSetOpsDisplayName ( ) { org . apache . ambari . server . orm . entities . HostRoleCommandEntity entity = new org . apache . ambari . server . orm . entities . HostRoleCommandEntity ( ) ; entity . setOpsDisplayName ( "foo" ) ; "<AssertPlaceHolder>" ; } getOpsDisplayName ( ) { return opsDisplayName ; } | org . junit . Assert . assertEquals ( "foo" , entity . getOpsDisplayName ( ) ) |
testOK ( ) { byte [ ] ok = org . apache . poi . xssf . util . TestEvilUnclosedBRFixingInputStream . getBytes ( "<p><div>Hello<sp>There!</div><sp><div>Tags!</div></p>" ) ; org . apache . poi . xssf . util . TestEvilUnclosedBRFixingInputStream . EvilUnclosedBRFixingInputStream inp = new org . apache . poi . xssf . util . TestEvilUnclosedBRFixingInputStream . EvilUnclosedBRFixingInputStream ( ok ) ; "<AssertPlaceHolder>" ; inp . close ( ) ; } toByteArray ( org . apache . poi . util . InputStream ) { return org . apache . poi . util . IOUtils . toByteArray ( stream , Integer . MAX_VALUE ) ; } | org . junit . Assert . assertArrayEquals ( ok , org . apache . poi . util . IOUtils . toByteArray ( inp ) ) |
testGetJMeterProperty ( ) { nz . co . breakpoint . jmeter . modifiers . TestPropertyAccessor . DummyTestElement element = new nz . co . breakpoint . jmeter . modifiers . TestPropertyAccessor . DummyTestElement ( ) ; nz . co . breakpoint . jmeter . modifiers . PropertyAccessor instance = new nz . co . breakpoint . jmeter . modifiers . PropertyAccessor ( ( ( element . getClass ( ) . getName ( ) ) + ".jprop" ) ) ; element . setProperty ( "jprop" , "foobar" ) ; "<AssertPlaceHolder>" ; } getProperty ( org . apache . jmeter . testelement . TestElement ) { java . lang . String propertyName = findPropertyAccessor ( element ) ; if ( propertyName != null ) { org . apache . jmeter . testelement . property . JMeterProperty prop = element . getProperty ( propertyName ) ; if ( ! ( prop instanceof org . apache . jmeter . testelement . property . NullProperty ) ) { nz . co . breakpoint . jmeter . modifiers . PropertyAccessor . log . debug ( ( ( "Using<sp>JMeter<sp>property<sp>" + ( prop . getName ( ) ) ) + "<sp>for<sp>getting<sp>property<sp>value" ) ) ; return prop instanceof org . apache . jmeter . testelement . property . FunctionProperty ? prop . getStringValue ( ) : prop . getObjectValue ( ) ; } try { java . beans . PropertyDescriptor accessor = new java . beans . PropertyDescriptor ( propertyName , element . getClass ( ) ) ; return accessor . getReadMethod ( ) . invoke ( element , new java . lang . Object [ ] { } ) ; } catch ( java . beans . IntrospectionException e ) { nz . co . breakpoint . jmeter . modifiers . PropertyAccessor . log . error ( ( ( "Property<sp>getter<sp>not<sp>found<sp>(" + propertyName ) + ")" ) ) ; } catch ( java . lang . reflect . InvocationTargetException e ) { nz . co . breakpoint . jmeter . modifiers . PropertyAccessor . log . error ( ( "Property<sp>getter<sp>exception:<sp>" + ( e . getCause ( ) ) ) ) ; } catch ( java . lang . IllegalAccessException e ) { nz . co . breakpoint . jmeter . modifiers . PropertyAccessor . log . error ( "Property<sp>getter<sp>not<sp>accessible" ) ; } } return null ; } | org . junit . Assert . assertEquals ( "foobar" , instance . getProperty ( element ) ) |
testCancelCaseInstance ( ) { final org . jbpm . workbench . cm . model . CaseInstanceSummary cis = caseInstanceSummaryList . remove ( 0 ) ; presenter . cancelCaseInstance ( cis ) ; verify ( caseManagementService ) . cancelCaseInstance ( cis . getContainerId ( ) , cis . getCaseId ( ) ) ; verify ( caseManagementService ) . getCaseInstances ( any ( org . jbpm . workbench . cm . util . CaseInstanceSearchRequest . class ) ) ; final org . mockito . ArgumentCaptor < java . util . List > captor = org . mockito . ArgumentCaptor . forClass ( java . util . List . class ) ; verify ( view ) . setCaseInstanceList ( captor . capture ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return dataBinder . getModel ( ) ; } | org . junit . Assert . assertEquals ( caseInstanceSummaryList . size ( ) , captor . getValue ( ) . size ( ) ) |
testRunQueryForCollection ( ) { int testResponse = 5 ; org . axonframework . queryhandling . QueryMessage < java . lang . Integer , java . util . List < java . lang . String > > testQueryMessage = new org . axonframework . queryhandling . GenericQueryMessage ( testResponse , org . axonframework . messaging . responsetypes . ResponseTypes . multipleInstancesOf ( java . lang . String . class ) ) ; java . util . Collection < java . lang . String > result = ( ( java . util . Collection < java . lang . String > ) ( testSubject . handle ( testQueryMessage ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return values . size ( ) ; } | org . junit . Assert . assertEquals ( testResponse , result . size ( ) ) |
testGetCurrentYLevel ( ) { final java . lang . Double actualLevel = gridLienzoScrollPosition . currentRelativeY ( ) ; final java . lang . Double expectedLevel = ( 100 * ( org . uberfire . ext . wires . core . grids . client . widget . scrollbars . GridLienzoScrollPositionTest . CURRENT_Y ) ) / ( org . uberfire . ext . wires . core . grids . client . widget . scrollbars . GridLienzoScrollPositionTest . DELTA_Y ) ; "<AssertPlaceHolder>" ; } currentRelativeY ( ) { final java . lang . Double delta = deltaY ( ) ; return delta == 0.0 ? 0.0 : ( 100 * ( currentY ( ) ) ) / delta ; } | org . junit . Assert . assertEquals ( actualLevel , expectedLevel , 0 ) |
testIsConsolePortValidLowNumber ( ) { try { org . arquillian . droidium . container . configuration . Validate . isConsolePortValid ( "2000" ) ; org . junit . Assert . fail ( ) ; } catch ( org . arquillian . droidium . container . configuration . AndroidContainerConfigurationException ex ) { java . lang . String expected = ( ( ( "Console<sp>port<sp>is<sp>not<sp>in<sp>the<sp>right<sp>range<sp>or<sp>it<sp>is<sp>not<sp>an<sp>even<sp>number.<sp>It<sp>has<sp>to<sp>be<sp>in<sp>the<sp>range<sp>" + ( org . arquillian . droidium . container . configuration . Validate . CONSOLE_PORT_MIN ) ) + "-" ) + ( org . arquillian . droidium . container . configuration . Validate . CONSOLE_PORT_MAX ) ) + "." ; "<AssertPlaceHolder>" ; } } isConsolePortValid ( java . lang . String ) { org . arquillian . droidium . container . configuration . Validate . notNullOrEmpty ( consolePort , "console<sp>port<sp>to<sp>validate<sp>is<sp>null<sp>or<sp>empty." ) ; try { long port = java . lang . Long . parseLong ( consolePort ) ; if ( ! ( ( ( port >= ( org . arquillian . droidium . container . configuration . Validate . CONSOLE_PORT_MIN ) ) && ( port <= ( org . arquillian . droidium . container . configuration . Validate . CONSOLE_PORT_MAX ) ) ) && ( ( port % 2 ) == 0 ) ) ) { throw new org . arquillian . droidium . container . configuration . AndroidContainerConfigurationException ( ( ( ( ( "Console<sp>port<sp>is<sp>not<sp>in<sp>the<sp>right<sp>range<sp>or<sp>it<sp>is<sp>not<sp>an<sp>even<sp>number.<sp>It<sp>has<sp>to<sp>be<sp>in<sp>the<sp>range<sp>" + ( org . arquillian . droidium . container . configuration . Validate . CONSOLE_PORT_MIN ) ) + "-" ) + ( org . arquillian . droidium . container . configuration . Validate . CONSOLE_PORT_MAX ) ) + "." ) ) ; } } catch ( java . lang . NumberFormatException e ) { throw new org . arquillian . droidium . container . configuration . AndroidContainerConfigurationException ( ( ( "Unable<sp>to<sp>get<sp>console<sp>port<sp>number<sp>from<sp>the<sp>string<sp>'" + consolePort ) + "'." ) ) ; } } | org . junit . Assert . assertEquals ( expected , ex . getMessage ( ) ) |
testGetInstance ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( instance ) |
special3 ( ) { org . apache . jena . sys . JenaSystem . init ( ) ; org . apache . jena . tdb2 . store . Dataset ds = dataset ( ) ; org . apache . jena . tdb2 . store . TestDatasetTDB . load1 ( ds . getDefaultModel ( ) ) ; org . apache . jena . tdb2 . store . TestDatasetTDB . load2 ( ds . getNamedModel ( "http://example/graph1" ) ) ; org . apache . jena . tdb2 . store . TestDatasetTDB . load3 ( ds . getNamedModel ( "http://example/graph2" ) ) ; org . apache . jena . rdf . model . Model m = org . apache . jena . rdf . model . ModelFactory . createDefaultModel ( ) ; org . apache . jena . tdb2 . store . TestDatasetTDB . load2 ( m ) ; org . apache . jena . tdb2 . store . TestDatasetTDB . load3 ( m ) ; java . lang . String qs = "CONSTRUCT<sp>{?s<sp>?p<sp>?o<sp>}<sp>WHERE<sp>{<sp>?s<sp>?p<sp>?o<sp>}" ; org . apache . jena . tdb2 . store . Query q = org . apache . jena . tdb2 . store . QueryFactory . create ( qs ) ; org . apache . jena . tdb2 . store . QueryExecution qExec = org . apache . jena . tdb2 . store . QueryExecutionFactory . create ( q , ds ) ; qExec . getContext ( ) . set ( TDB2 . symUnionDefaultGraph , true ) ; org . apache . jena . rdf . model . Model m2 = qExec . execConstruct ( ) ; if ( ! ( m . isIsomorphicWith ( m2 ) ) ) { System . out . println ( "----<sp>----" ) ; org . apache . jena . sparql . sse . SSE . write ( ds . asDatasetGraph ( ) ) ; System . out . println ( "--<sp>Expected" ) ; m . write ( System . out , "TTL" ) ; System . out . println ( "--<sp>Actual" ) ; m2 . write ( System . out , "TTL" ) ; System . out . println ( "----<sp>----" ) ; } "<AssertPlaceHolder>" ; } isIsomorphicWith ( org . apache . jena . graph . impl . Graph ) { return base . isIsomorphicWith ( g ) ; } | org . junit . Assert . assertTrue ( m . isIsomorphicWith ( m2 ) ) |
testInfoTempFile ( ) { final java . lang . String pathname = edu . illinois . library . cantaloupe . config . Configuration . getInstance ( ) . getString ( Key . FILESYSTEMCACHE_PATHNAME ) ; final edu . illinois . library . cantaloupe . image . Identifier identifier = new edu . illinois . library . cantaloupe . image . Identifier ( "cats_~!@#$%^&*()" ) ; final java . nio . file . Path expected = java . nio . file . Paths . get ( pathname , "info" , edu . illinois . library . cantaloupe . cache . FilesystemCache . FilesystemCache . hashedPathFragment ( identifier . toString ( ) ) , ( ( ( edu . illinois . library . cantaloupe . util . StringUtils . md5 ( identifier . toString ( ) ) ) + ".json" ) + ( edu . illinois . library . cantaloupe . cache . FilesystemCache . FilesystemCache . tempFileSuffix ( ) ) ) ) ; "<AssertPlaceHolder>" ; } infoTempFile ( edu . illinois . library . cantaloupe . image . Identifier ) { return edu . illinois . library . cantaloupe . cache . FilesystemCache . rootInfoPath ( ) . resolve ( edu . illinois . library . cantaloupe . cache . FilesystemCache . hashedPathFragment ( identifier . toString ( ) ) ) . resolve ( ( ( ( edu . illinois . library . cantaloupe . util . StringUtils . md5 ( identifier . toString ( ) ) ) + ( edu . illinois . library . cantaloupe . cache . FilesystemCache . INFO_EXTENSION ) ) + ( edu . illinois . library . cantaloupe . cache . FilesystemCache . tempFileSuffix ( ) ) ) ) ; } | org . junit . Assert . assertEquals ( expected , infoTempFile ( identifier ) ) |
testUnderline ( ) { java . lang . String expected = "<u>text</u>" ; java . lang . String actual = _htmlBBCodeTranslator . parse ( "[u]text[/u]" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( com . liferay . portal . kernel . util . Validator . isNull ( s ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String [ ] fields = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _fieldSeparatorPattern . split ( s ) ; if ( ( ( fields . length ) != 4 ) && ( ( fields . length ) != 5 ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String name = fields [ 0 ] ; name = _http . decodeURL ( name ) ; java . lang . String description = fields [ 1 ] ; description = _http . decodeURL ( description ) ; java . lang . String uuid = fields [ 2 ] ; if ( ( com . liferay . portal . kernel . util . Validator . isNull ( name ) ) || ( com . liferay . portal . kernel . util . Validator . isNull ( uuid ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String [ ] attributes = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _attributeSeparatorPattern . split ( fields [ 3 ] ) ; java . util . Map < java . lang . String , java . lang . String > properties = new java . util . HashMap ( ) ; for ( java . lang . String attribute : attributes ) { java . lang . String [ ] keyValuePair = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _keyValueSeparatorPattern . split ( attribute ) ; properties . put ( keyValuePair [ 0 ] , keyValuePair [ 1 ] ) ; } boolean enabled = true ; if ( ( fields . length ) == 5 ) { java . lang . String disabledAttribute = fields [ 4 ] ; java . util . regex . Matcher matcher = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _disabledSeparatorPattern . matcher ( disabledAttribute ) ; if ( ! ( matcher . matches ( ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } enabled = com . liferay . portal . kernel . util . GetterUtil . getBoolean ( matcher . group ( 1 ) ) ; } return new com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryImpl ( name , description , uuid , properties , enabled ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
checkAddSubscription_addSubscription_Access ( ) { final long SERVICE_KEY = 12000L ; userBean . setRequestedRedirect ( SUBSCRIPTION_ADD_PAGE ) ; userBean . getSessionBean ( ) . setSelectedServiceKeyForCustomer ( SERVICE_KEY ) ; org . oscm . internal . vo . VOUserDetails user = new org . oscm . internal . vo . VOUserDetails ( ) ; user . setKey ( 1000L ) ; org . oscm . ui . beans . List < java . lang . Long > invisibleServices = org . oscm . ui . beans . Arrays . asList ( java . lang . Long . valueOf ( 110L ) ) ; doReturn ( invisibleServices ) . when ( userGroupService ) . getInvisibleProductKeysForUser ( user . getKey ( ) ) ; userBean . checkAddSubacription ( user ) ; "<AssertPlaceHolder>" ; } getRequestedRedirect ( ) { return ( requestedRedirect ) == null ? "" : requestedRedirect ; } | org . junit . Assert . assertEquals ( SUBSCRIPTION_ADD_PAGE , userBean . getRequestedRedirect ( ) ) |
restoreWithFilterSuccessfullyWhenOptionalFileDoesNotExistAndNotMatching ( ) { if ( path . toFile ( ) . delete ( ) ) { "<AssertPlaceHolder>" ; verify ( mockPathUtils , never ( ) ) . getChecksumFor ( any ( java . nio . file . Path . class ) ) ; } else { throw new java . lang . AssertionError ( "Was<sp>unable<sp>to<sp>delete<sp>the<sp>file." ) ; } } restore ( boolean , java . nio . file . PathMatcher ) { org . apache . commons . lang . Validate . notNull ( filter , "invalid<sp>null<sp>path<sp>filter" ) ; if ( ( restored ) == null ) { this . restored = false ; if ( filter . matches ( path ) ) { this . restored = handleRestore ( required , filter ) ; } else { this . restored = handleRestoreWhenFilterNotMatching ( required ) ; } } return restored ; } | org . junit . Assert . assertThat ( entry . restore ( false , ( p ) -> false ) , org . hamcrest . CoreMatchers . equalTo ( true ) ) |
shouldNotIncludeLaunchClasspathWhenFlagUnset ( ) { final org . pitest . mutationtest . config . ReportOptions actual = parseAddingRequiredArgs ( "--includeLaunchClasspath=false" ) ; "<AssertPlaceHolder>" ; } isIncludeLaunchClasspath ( ) { return this . includeLaunchClasspath ; } | org . junit . Assert . assertFalse ( actual . isIncludeLaunchClasspath ( ) ) |
testADinheritance5 ( ) { java . util . ArrayList < jannovar . exome . Variant > lst = constructGenotypeCall ( Genotype . HETEROZYGOUS , Genotype . HOMOZYGOUS_REF , Genotype . HETEROZYGOUS , Genotype . HOMOZYGOUS_REF , Genotype . HETEROZYGOUS , Genotype . HETEROZYGOUS ) ; boolean b = jannovar . pedigree . PedigreeADTest . pedigree . isCompatibleWithAutosomalDominant ( lst ) ; "<AssertPlaceHolder>" ; } isCompatibleWithAutosomalDominant ( java . util . ArrayList ) { if ( variantCompatible && ( n_affected_with_het > 0 ) ) return true ; } return false ; } | org . junit . Assert . assertEquals ( false , b ) |
shouldCountAllChildrenNotIncludingActualType ( ) { final org . openspotlight . bundle . language . java . metamodel . node . JavaType type = org . openspotlight . bundle . language . java . resolver . JavaTypeResolverTest . javaTypeFinder . getType ( "com.crud.dao.Dao" ) ; final int size = org . openspotlight . bundle . language . java . resolver . JavaTypeResolverTest . javaTypeFinder . countAllChildren ( type , IncludedResult . DO_NOT_INCLUDE_ACTUAL_TYPE_ON_RESULT ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( size , org . hamcrest . core . Is . is ( 4 ) ) |
testMutableMultiply_double ( ) { jsat . linear . DenseMatrix AtTwo = new jsat . linear . DenseMatrix ( new double [ ] [ ] { new double [ ] { 1 * 2 , 5 * 2 , 4 * 2 , 8 * 2 , 9 * 2 } , new double [ ] { 1 * 2 , 5 * 2 , 7 * 2 , 3 * 2 , 7 * 2 } , new double [ ] { 0 * 2 , 3 * 2 , 8 * 2 , 5 * 2 , 6 * 2 } , new double [ ] { 3 * 2 , 8 * 2 , 0 * 2 , 7 * 2 , 0 * 2 } , new double [ ] { 1 * 2 , 9 * 2 , 2 * 2 , 9 * 2 , 6 * 2 } } ) ; jsat . linear . Matrix aCopy = jsat . linear . MatrixOfVecsTest . A . clone ( ) ; aCopy . mutableMultiply ( 2 ) ; "<AssertPlaceHolder>" ; } mutableMultiply ( double ) { for ( jsat . distributions . kernels . KernelPoint kp : points ) kp . mutableMultiply ( c ) ; } | org . junit . Assert . assertEquals ( AtTwo , aCopy ) |
testGetNewRow_10args ( ) { System . out . println ( "getNewRow" ) ; java . util . concurrent . ConcurrentSkipListMap < java . lang . String , kg . apc . charting . AbstractGraphRow > model = new java . util . concurrent . ConcurrentSkipListMap ( ) ; int rowType = 0 ; java . lang . String label = "" ; int markerSize = 0 ; boolean isBarRow = false ; boolean displayLabel = false ; boolean thickLines = false ; boolean showInLegend = false ; kg . apc . jmeter . graphs . Color color = null ; boolean canCompose = false ; kg . apc . jmeter . graphs . AbstractGraphPanelVisualizer instance = new kg . apc . jmeter . graphs . AbstractGraphPanelVisualizerTest . AbstractGraphPanelVisualizerImpl ( ) ; kg . apc . charting . AbstractGraphRow result = instance . getNewRow ( model , rowType , label , markerSize , false , false , thickLines , showInLegend , color , canCompose ) ; "<AssertPlaceHolder>" ; } println ( java . lang . String ) { kg . apc . jmeter . reporters . ConsoleStatusLogger . log . info ( msg ) ; } | org . junit . Assert . assertNotNull ( result ) |
shouldNotInjectIfConfigUuidDoesNotMatch ( ) { org . openqa . selenium . ImmutableCapabilities defaultConfigWithUuid = new org . openqa . selenium . ImmutableCapabilities ( "browserName" , "firefox" , BINARY , "binary" , "firefox_profile" , "profile" , MARIONETTE , true , org . openqa . grid . internal . utils . configuration . GridNodeConfiguration . CONFIG_UUID_CAPABILITY , "uuid" ) ; org . openqa . selenium . ImmutableCapabilities caps = new org . openqa . selenium . ImmutableCapabilities ( "browserName" , "firefox" , MARIONETTE , "cheese" , org . openqa . grid . internal . utils . configuration . GridNodeConfiguration . CONFIG_UUID_CAPABILITY , "123" ) ; org . openqa . selenium . Capabilities seen = new org . openqa . grid . selenium . node . FirefoxMutator ( defaultConfigWithUuid ) . apply ( caps ) ; "<AssertPlaceHolder>" ; } getCapability ( java . lang . String ) { return caps . get ( capabilityName ) ; } | org . junit . Assert . assertEquals ( "cheese" , seen . getCapability ( org . openqa . grid . selenium . node . MARIONETTE ) ) |
testLotsOfConcurrentConnections ( ) { java . util . concurrent . ExecutorService executor = java . util . concurrent . Executors . newCachedThreadPool ( ) ; final javax . jms . ConnectionFactory factory = createConnectionFactory ( ) ; int connectionCount = 400 ; final java . util . concurrent . atomic . AtomicInteger threadId = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; for ( int i = 0 ; i < connectionCount ; i ++ ) { executor . execute ( new java . lang . Runnable ( ) { @ org . apache . activemq . broker . Override public void run ( ) { final int innerId = threadId . incrementAndGet ( ) ; try { javax . jms . ExceptionListener listener = new org . apache . activemq . broker . NioQueueSubscriptionTestListener ( innerId , exceptions , org . apache . activemq . broker . NioQueueSubscriptionTest . LOG ) ; org . apache . activemq . ActiveMQConnection connection = ( ( org . apache . activemq . ActiveMQConnection ) ( factory . createConnection ( ) ) ) ; connection . setExceptionListener ( listener ) ; connection . start ( ) ; "<AssertPlaceHolder>" ; connections . add ( connection ) ; } catch ( java . lang . Exception e ) { org . apache . activemq . broker . NioQueueSubscriptionTest . LOG . error ( ( ">>>><sp>Exception<sp>in<sp>run()<sp>on<sp>thread<sp>" + innerId ) , e ) ; exceptions . put ( java . lang . Thread . currentThread ( ) , e ) ; } } } ) ; } executor . shutdown ( ) ; executor . awaitTermination ( 30 , TimeUnit . SECONDS ) ; if ( ! ( exceptions . isEmpty ( ) ) ) { org . apache . activemq . broker . NioQueueSubscriptionTest . LOG . error ( ( ( ">>>><sp>" + ( exceptions . size ( ) ) ) + "<sp>exceptions<sp>like" ) , exceptions . values ( ) . iterator ( ) . next ( ) ) ; org . junit . Assert . fail ( ( "unexpected<sp>exceptions<sp>in<sp>worker<sp>threads:<sp>" + ( exceptions . values ( ) . iterator ( ) . next ( ) ) ) ) ; } org . apache . activemq . broker . NioQueueSubscriptionTest . LOG . info ( ( ( "created<sp>" + connectionCount ) + "<sp>connections" ) ) ; } getBrokerName ( ) { return this . brokerName ; } | org . junit . Assert . assertNotNull ( connection . getBrokerName ( ) ) |
testEchoLong ( ) { try { org . thriftzmq . TZMQMultiThreadServerTest . logger . info ( "echoLong" ) ; org . thriftzmq . TZMQMultiThreadServer server = org . thriftzmq . TZMQMultiThreadServerTest . createServer ( org . thriftzmq . TZMQMultiThreadServerTest . TCP_ENDPOINT ) ; server . startAndWait ( ) ; org . apache . thrift . transport . TTransport clientTransport = org . thriftzmq . TZMQClientFactory . create ( org . thriftzmq . TZMQMultiThreadServerTest . context , org . thriftzmq . TZMQMultiThreadServerTest . TCP_ENDPOINT ) ; org . thriftzmq . test . Service1 . Client client = new org . thriftzmq . test . Service1 . Client ( new org . apache . thrift . protocol . TCompactProtocol ( clientTransport ) ) ; clientTransport . open ( ) ; int l = 1024 * 1024 ; char [ ] c = new char [ l ] ; java . util . Random rand = new java . util . Random ( 12345 ) ; for ( int i = 0 ; i < l ; i ++ ) { c [ i ] = ( ( char ) ( ( rand . nextInt ( ( 128 - 32 ) ) ) + 32 ) ) ; } java . lang . String s = new java . lang . String ( c ) ; java . lang . String r = client . echo ( s ) ; "<AssertPlaceHolder>" ; clientTransport . close ( ) ; server . stopAndWait ( ) ; } catch ( java . lang . Throwable ex ) { org . thriftzmq . TZMQMultiThreadServerTest . logger . error ( "Error<sp>in<sp>test" , ex ) ; throw ex ; } } echo ( java . lang . String ) { return s ; } | org . junit . Assert . assertEquals ( s , r ) |
readContentOnlyEmployee ( ) { java . lang . String content = readFile ( "JsonEmployeeContentOnly.json" ) ; org . apache . olingo . odata2 . api . edm . EdmEntitySet entitySet = org . apache . olingo . odata2 . testutil . mock . MockFacade . getMockEdm ( ) . getDefaultEntityContainer ( ) . getEntitySet ( "Employees" ) ; java . io . InputStream contentBody = createContentAsStream ( content ) ; org . apache . olingo . odata2 . client . api . ep . EntityStream contentStream = new org . apache . olingo . odata2 . client . api . ep . EntityStream ( ) ; contentStream . setContent ( contentBody ) ; contentStream . setReadProperties ( org . apache . olingo . odata2 . client . api . ep . DeserializerProperties . init ( ) . build ( ) ) ; org . apache . olingo . odata2 . client . core . ep . deserializer . JsonEntityDeserializer xec = new org . apache . olingo . odata2 . client . core . ep . deserializer . JsonEntityDeserializer ( ) ; org . apache . olingo . odata2 . api . ep . entry . ODataEntry result = xec . readEntry ( entitySet , contentStream ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return properties ; } | org . junit . Assert . assertEquals ( 9 , result . getProperties ( ) . size ( ) ) |
hashcodeShouldBeSameWithContentTypeString ( ) { java . lang . String contentTypeString = "application/json" ; com . navercorp . volleyextensions . volleyer . http . ContentType contentType = com . navercorp . volleyextensions . volleyer . http . ContentType . createContentType ( contentTypeString ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return contentTypeString . hashCode ( ) ; } | org . junit . Assert . assertThat ( contentType . hashCode ( ) , org . hamcrest . CoreMatchers . is ( contentTypeString . hashCode ( ) ) ) |
testGetValue ( ) { org . seasar . framework . mock . sql . MockResultSet rs = new org . seasar . framework . mock . sql . MockResultSet ( ) ; org . seasar . framework . util . ArrayMap rowData = new org . seasar . framework . util . ArrayMap ( ) ; rowData . put ( "hoge" , 1 ) ; rs . addRowData ( rowData ) ; rs . next ( ) ; org . seasar . extension . jdbc . gen . internal . sqltype . FloatType type = new org . seasar . extension . jdbc . gen . internal . sqltype . FloatType ( ) ; "<AssertPlaceHolder>" ; } getValue ( java . sql . ResultSet , int ) { return org . seasar . framework . util . ShortConversionUtil . toShort ( resultSet . getObject ( index ) ) ; } | org . junit . Assert . assertEquals ( "1" , type . getValue ( rs , 1 ) ) |
testConfig ( ) { net . oscartech . tesseract . common . config . Configuration configuration = new net . oscartech . tesseract . common . config . Configuration ( "log" ) ; java . lang . String value = configuration . getString ( "size" ) ; "<AssertPlaceHolder>" ; } getString ( java . lang . String ) { return getComponentConfigValue ( configName ) ; } | org . junit . Assert . assertEquals ( "1" , value ) |
testByteToInteger ( ) { result3 = org . onosproject . isis . io . util . IsisUtil . byteToInteger ( intger ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Class ) { return true ; } | org . junit . Assert . assertThat ( result3 , org . hamcrest . CoreMatchers . is ( 1 ) ) |
testDeleteStorageUnitNotificationRegistration ( ) { org . finra . herd . model . api . xml . NotificationRegistrationKey storageUnitNotificationRegistrationKey = new org . finra . herd . model . api . xml . NotificationRegistrationKey ( NAMESPACE , NOTIFICATION_NAME ) ; org . finra . herd . model . api . xml . StorageUnitNotificationRegistration storageUnitNotificationRegistration = new org . finra . herd . model . api . xml . StorageUnitNotificationRegistration ( ID , storageUnitNotificationRegistrationKey , NotificationEventTypeEntity . EventTypesStorageUnit . STRGE_UNIT_STTS_CHG . name ( ) , new org . finra . herd . model . api . xml . StorageUnitNotificationFilter ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , STORAGE_NAME , STORAGE_UNIT_STATUS , STORAGE_UNIT_STATUS_2 ) , notificationRegistrationDaoTestHelper . getTestJobActions ( ) , org . finra . herd . model . jpa . NotificationRegistrationStatusEntity . ENABLED ) ; when ( storageUnitNotificationRegistrationService . deleteStorageUnitNotificationRegistration ( storageUnitNotificationRegistrationKey ) ) . thenReturn ( storageUnitNotificationRegistration ) ; org . finra . herd . model . api . xml . StorageUnitNotificationRegistration deletedStorageUnitNotificationRegistration = storageUnitNotificationRegistrationRestController . deleteStorageUnitNotification ( org . finra . herd . rest . NAMESPACE , org . finra . herd . rest . NOTIFICATION_NAME ) ; verify ( storageUnitNotificationRegistrationService ) . deleteStorageUnitNotificationRegistration ( storageUnitNotificationRegistrationKey ) ; verifyNoMoreInteractions ( storageUnitNotificationRegistrationService ) ; "<AssertPlaceHolder>" ; } deleteStorageUnitNotificationRegistration ( org . finra . herd . model . api . xml . NotificationRegistrationKey ) { validateStorageUnitNotificationRegistrationKey ( notificationRegistrationKey ) ; org . finra . herd . model . jpa . StorageUnitNotificationRegistrationEntity storageUnitNotificationRegistrationEntity = storageUnitNotificationRegistrationDaoHelper . getStorageUnitNotificationRegistrationEntity ( notificationRegistrationKey ) ; storageUnitNotificationRegistrationDao . delete ( storageUnitNotificationRegistrationEntity ) ; return createStorageUnitNotificationFromEntity ( storageUnitNotificationRegistrationEntity ) ; } | org . junit . Assert . assertEquals ( storageUnitNotificationRegistration , deletedStorageUnitNotificationRegistration ) |
testBuildLogFailureReaderSuccessfulNF2 ( ) { com . cloudbees . hudson . plugins . folder . Folder f0 = createFolder ( ) ; com . cloudbees . hudson . plugins . folder . Folder f = f0 . createProject ( com . cloudbees . hudson . plugins . folder . Folder . class , "f2" ) ; hudson . model . FreeStyleProject project = f . createProject ( hudson . model . FreeStyleProject . class , "foo" ) ; project . getBuildersList ( ) . add ( new com . sonyericsson . jenkins . plugins . bfa . test . utils . PrintToLogBuilder ( com . sonyericsson . jenkins . plugins . bfa . model . indication . BuildLogIndicationFoldersTest . TEST_STRING ) ) ; hudson . model . FreeStyleBuild build = r . buildAndAssertSuccess ( project ) ; com . sonyericsson . jenkins . plugins . bfa . model . indication . BuildLogIndication indication = new com . sonyericsson . jenkins . plugins . bfa . model . indication . BuildLogIndication ( ".*test.*" ) ; com . sonyericsson . jenkins . plugins . bfa . model . BuildLogFailureReader reader = new com . sonyericsson . jenkins . plugins . bfa . model . BuildLogFailureReader ( indication ) ; com . sonyericsson . jenkins . plugins . bfa . model . indication . FoundIndication found = reader . scan ( build ) ; "<AssertPlaceHolder>" ; } scan ( hudson . model . Run ) { java . lang . String currentfile = build . getLogFile ( ) . getName ( ) ; java . io . BufferedReader reader = null ; try { reader = new java . io . BufferedReader ( build . getLogReader ( ) ) ; return scanMultiLineOneFile ( build , reader , currentfile ) ; } finally { if ( reader != null ) { try { reader . close ( ) ; } catch ( java . io . IOException e ) { com . sonyericsson . jenkins . plugins . bfa . model . MultilineBuildLogFailureReader . logger . log ( Level . WARNING , "Failed<sp>to<sp>close<sp>the<sp>reader.<sp>" , e ) ; } } } } | org . junit . Assert . assertNotNull ( found ) |
testOSD ( ) { net . sourceforge . tess4j . TessAPI1Test . logger . info ( "OSD" ) ; int expResult = TessPageSegMode . PSM_AUTO_OSD ; java . nio . IntBuffer orientation = java . nio . IntBuffer . allocate ( 1 ) ; java . nio . IntBuffer direction = java . nio . IntBuffer . allocate ( 1 ) ; java . nio . IntBuffer order = java . nio . IntBuffer . allocate ( 1 ) ; java . nio . FloatBuffer deskew_angle = java . nio . FloatBuffer . allocate ( 1 ) ; java . io . File tiff = new java . io . File ( this . testResourcesDataPath , "eurotext.tif" ) ; java . awt . image . BufferedImage image = javax . imageio . ImageIO . read ( new java . io . FileInputStream ( tiff ) ) ; java . nio . ByteBuffer buf = net . sourceforge . tess4j . util . ImageIOHelper . convertImageData ( image ) ; int bpp = image . getColorModel ( ) . getPixelSize ( ) ; int bytespp = bpp / 8 ; int bytespl = ( ( int ) ( java . lang . Math . ceil ( ( ( ( image . getWidth ( ) ) * bpp ) / 8.0 ) ) ) ) ; net . sourceforge . tess4j . TessAPI1 . TessBaseAPIInit3 ( handle , datapath , language ) ; net . sourceforge . tess4j . TessAPI1 . TessBaseAPISetPageSegMode ( handle , expResult ) ; int actualResult = net . sourceforge . tess4j . TessAPI1 . TessBaseAPIGetPageSegMode ( handle ) ; net . sourceforge . tess4j . TessAPI1Test . logger . info ( ( "PSM:<sp>" + ( net . sourceforge . tess4j . util . Utils . getConstantName ( actualResult , net . sourceforge . tess4j . TessPageSegMode . class ) ) ) ) ; net . sourceforge . tess4j . TessAPI1 . TessBaseAPISetImage ( handle , buf , image . getWidth ( ) , image . getHeight ( ) , bytespp , bytespl ) ; int success = net . sourceforge . tess4j . TessAPI1 . TessBaseAPIRecognize ( handle , null ) ; if ( success == 0 ) { net . sourceforge . tess4j . TessAPI1 . TessPageIterator pi = net . sourceforge . tess4j . TessAPI1 . TessBaseAPIAnalyseLayout ( handle ) ; net . sourceforge . tess4j . TessAPI1 . TessPageIteratorOrientation ( pi , orientation , direction , order , deskew_angle ) ; net . sourceforge . tess4j . TessAPI1Test . logger . info ( java . lang . String . format ( "Orientation:<sp>%s\nWritingDirection:<sp>%s\nTextlineOrder:<sp>%s\nDeskew<sp>angle:<sp>%.4f\n" , net . sourceforge . tess4j . util . Utils . getConstantName ( orientation . get ( ) , net . sourceforge . tess4j . TessOrientation . class ) , net . sourceforge . tess4j . util . Utils . getConstantName ( direction . get ( ) , net . sourceforge . tess4j . TessWritingDirection . class ) , net . sourceforge . tess4j . util . Utils . getConstantName ( order . get ( ) , net . sourceforge . tess4j . TessTextlineOrder . class ) , deskew_angle . get ( ) ) ) ; } "<AssertPlaceHolder>" ; } getConstantName ( java . lang . Object , java . lang . Class ) { for ( java . lang . reflect . Field f : c . getDeclaredFields ( ) ) { int mod = f . getModifiers ( ) ; if ( ( ( java . lang . reflect . Modifier . isStatic ( mod ) ) && ( java . lang . reflect . Modifier . isPublic ( mod ) ) ) && ( java . lang . reflect . Modifier . isFinal ( mod ) ) ) { try { if ( f . get ( null ) . equals ( value ) ) { return f . getName ( ) ; } } catch ( java . lang . IllegalAccessException e ) { return java . lang . String . valueOf ( value ) ; } } } return java . lang . String . valueOf ( value ) ; } | org . junit . Assert . assertEquals ( expResult , actualResult ) |
testLongWait ( ) { final int blockTime = 1 ; org . apache . jackrabbit . oak . segment . memory . MemoryStore ms = new org . apache . jackrabbit . oak . segment . memory . MemoryStore ( ) ; java . lang . System . setProperty ( "oak.checkpoints.lockWaitTime" , "2" ) ; org . apache . jackrabbit . oak . stats . StatisticsProvider statsProvider = org . apache . jackrabbit . oak . stats . StatisticsProvider . NOOP ; org . apache . jackrabbit . oak . segment . SegmentNodeStoreStats stats = new org . apache . jackrabbit . oak . segment . SegmentNodeStoreStats ( statsProvider ) ; final org . apache . jackrabbit . oak . segment . scheduler . LockBasedScheduler scheduler = org . apache . jackrabbit . oak . segment . scheduler . LockBasedScheduler . builder ( ms . getRevisions ( ) , ms . getReader ( ) , stats ) . build ( ) ; final java . util . concurrent . Semaphore semaphore = new java . util . concurrent . Semaphore ( 0 ) ; final java . util . concurrent . Callable < java . lang . Boolean > block = new java . util . concurrent . Callable < java . lang . Boolean > ( ) { @ org . apache . jackrabbit . oak . segment . scheduler . Override public org . apache . jackrabbit . oak . segment . scheduler . Boolean call ( ) { try { semaphore . release ( ) ; org . apache . jackrabbit . oak . segment . scheduler . SECONDS . sleep ( blockTime ) ; } catch ( java . lang . InterruptedException e ) { } return true ; } } ; java . lang . Thread background = new java . lang . Thread ( ) { @ org . apache . jackrabbit . oak . segment . scheduler . Override public void run ( ) { try { org . apache . jackrabbit . oak . segment . scheduler . Commit commit = createBlockingCommit ( scheduler , "foo" , "bar" , block ) ; scheduler . schedule ( commit ) ; } catch ( java . lang . Exception e ) { } } } ; background . start ( ) ; semaphore . acquire ( ) ; java . lang . String cp0 = scheduler . checkpoint ( 10 , java . util . Collections . < java . lang . String , java . lang . String > emptyMap ( ) ) ; "<AssertPlaceHolder>" ; } retrieveCheckpoint ( org . apache . jackrabbit . oak . segment . scheduler . Scheduler , java . lang . String ) { checkNotNull ( checkpoint ) ; org . apache . jackrabbit . oak . spi . state . NodeState cp = scheduler . getHeadNodeState ( ) . getChildNode ( "checkpoints" ) . getChildNode ( checkpoint ) . getChildNode ( "root" ) ; if ( cp . exists ( ) ) { return cp ; } return null ; } | org . junit . Assert . assertNotNull ( retrieveCheckpoint ( scheduler , cp0 ) ) |
testValueOfNoExpansion ( ) { int [ ] expected = new int [ ] { 8193 , 3512 , 34211 , 0 , 0 , 35374 , 880 , 29492 } ; edu . harvard . iq . dataverse . authorization . groups . impl . ipaddress . ip . IPv6Address adr = edu . harvard . iq . dataverse . authorization . groups . impl . ipaddress . ip . IPv6Address . valueOf ( "2001:db8:85a3:0:0:8a2e:370:7334" ) ; for ( int i = 0 ; i < 8 ; i ++ ) { "<AssertPlaceHolder>" ; } } get ( java . lang . String ) { return groupAlias . equals ( edu . harvard . iq . dataverse . authorization . groups . impl . builtin . AllUsers . get ( ) . getAlias ( ) ) ? edu . harvard . iq . dataverse . authorization . groups . impl . builtin . AllUsers . get ( ) : groupAlias . equals ( edu . harvard . iq . dataverse . authorization . groups . impl . builtin . AuthenticatedUsers . get ( ) . getAlias ( ) ) ? edu . harvard . iq . dataverse . authorization . groups . impl . builtin . AuthenticatedUsers . get ( ) : null ; } | org . junit . Assert . assertEquals ( expected [ i ] , adr . get ( i ) ) |
testZoneidMinusOne ( ) { registerTemplateCmdByAdmin = new org . apache . cloudstack . api . command . admin . template . RegisterTemplateCmdByAdmin ( ) ; registerTemplateCmdByAdmin . zoneId = - 1L ; "<AssertPlaceHolder>" ; } getZoneIds ( ) { if ( ( ( zoneIds ) != null ) && ( ! ( zoneIds . isEmpty ( ) ) ) ) { if ( ( ( zoneIds . size ( ) ) == 1 ) && ( ( zoneIds . get ( 0 ) ) == ( - 1L ) ) ) return null ; else return zoneIds ; } if ( ( zoneId ) == null ) return null ; if ( ( ( zoneId ) != null ) && ( ( zoneId ) == ( - 1 ) ) ) return null ; java . util . List < java . lang . Long > zones = new java . util . ArrayList ( ) ; zones . add ( zoneId ) ; return zones ; } | org . junit . Assert . assertNull ( registerTemplateCmdByAdmin . getZoneIds ( ) ) |
testGetSchemaDetails ( ) { classUnderTest . setSchemaDetails ( null ) ; "<AssertPlaceHolder>" ; } getSchemaDetails ( ) { return _schemaDetails ; } | org . junit . Assert . assertNull ( classUnderTest . getSchemaDetails ( ) ) |
testSetPath ( ) { metadata . setPath ( "testpath" ) ; "<AssertPlaceHolder>" ; } getPath ( ) { return ( file ) != null ? file . toString ( ) : null ; } | org . junit . Assert . assertEquals ( "testpath" , metadata . getPath ( ) ) |
runTest ( ) { boolean result = checkNoError ( "Social_Blogs_My_Blogs" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
trie_clear_01 ( ) { org . apache . jena . atlas . lib . Trie < java . lang . Integer > trie = new org . apache . jena . atlas . lib . Trie ( ) ; trie . clear ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { checkRead ( ) ; return holder . getBaseItem ( ) . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( trie . isEmpty ( ) ) |
createProjectQuery ( ) { final org . kie . workbench . common . screens . library . api . ProjectAssetsQuery retrieved = titledAttachmentFileWidget . createProjectQuery ( ) ; "<AssertPlaceHolder>" ; } createProjectQuery ( ) { java . util . List < java . lang . String > suffixes = java . util . Collections . singletonList ( "dmn" ) ; return new org . kie . workbench . common . screens . library . api . ProjectAssetsQuery ( workspaceProject , "" , 0 , 1000 , suffixes ) ; } | org . junit . Assert . assertNotNull ( retrieved ) |
shouldCleanupPodWhenPullImageError ( ) { final java . lang . String name = createdPod . getMetadata ( ) . getName ( ) ; when ( k8sClient . pods ( ) . withName ( name ) ) . thenReturn ( namedPod ) ; when ( namedPod . get ( ) ) . thenReturn ( createdPod ) ; com . spotify . styx . docker . KubernetesPodEventTranslatorTest . setWaiting ( createdPod , "Pending" , "ErrImagePull" ) ; com . spotify . styx . docker . var runState = com . spotify . styx . state . RunState . create ( com . spotify . styx . docker . KubernetesDockerRunnerTest . WORKFLOW_INSTANCE , State . TERMINATED ) ; com . spotify . styx . docker . var shouldDelete = kdr . shouldDeletePodWithRunState ( com . spotify . styx . docker . KubernetesDockerRunnerTest . WORKFLOW_INSTANCE , createdPod , runState ) ; "<AssertPlaceHolder>" ; } is ( com . spotify . styx . api . Api$Version ) { return new org . hamcrest . TypeSafeMatcher < com . spotify . styx . api . Api . Version > ( ) { @ com . spotify . styx . api . Override protected boolean matchesSafely ( com . spotify . styx . api . Api . Version item ) { return ( item . ordinal ( ) ) == ( version . ordinal ( ) ) ; } @ com . spotify . styx . api . Override public void describeTo ( org . hamcrest . Description description ) { description . appendText ( "Version<sp>can<sp>only<sp>be" ) ; description . appendValue ( version ) ; } } ; } | org . junit . Assert . assertThat ( shouldDelete , org . hamcrest . Matchers . is ( true ) ) |
testDestroy ( ) { tested . open ( session , callback ) ; tested . destroy ( ) ; "<AssertPlaceHolder>" ; verify ( canvasHandler , times ( 1 ) ) . destroy ( ) ; verify ( view , times ( 1 ) ) . clear ( ) ; } getInstance ( ) { return delegate . getInstance ( ) ; } | org . junit . Assert . assertNull ( tested . getInstance ( ) ) |
addEmptyRange ( ) { org . roaringbitmap . Container ac = new org . roaringbitmap . ArrayContainer ( ) ; ac = ac . add ( 1 , 1 ) ; "<AssertPlaceHolder>" ; } getCardinality ( ) { return ( ( int ) ( getLongCardinality ( ) ) ) ; } | org . junit . Assert . assertEquals ( 0 , ac . getCardinality ( ) ) |
constructorSavesCorrectConfigAndListener ( ) { baseExpectations ( ) ; tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . MqttIotHubConnection connection = new tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . MqttIotHubConnection ( mockConfig ) ; tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . DeviceClientConfig actualClientConfig = tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . Deencapsulation . getField ( connection , "config" ) ; tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . DeviceClientConfig expectedClientConfig = mockConfig ; "<AssertPlaceHolder>" ; } baseExpectations ( ) { new tests . unit . com . microsoft . azure . sdk . iot . device . NonStrictExpectations ( ) { { new tests . unit . com . microsoft . azure . sdk . iot . device . IotHubConnectionString ( anyString ) ; result = mockedIotHubConnectionString ; mockedIotHubConnectionString . getModuleId ( ) ; result = "someModuleId" ; mockedDeviceClientConfig . getModuleId ( ) ; result = "someModuleId" ; } } ; } | org . junit . Assert . assertEquals ( expectedClientConfig , actualClientConfig ) |
testProvideAucx ( ) { final int transactionId = 12345 ; final org . restcomm . media . core . control . mgcp . util . collections . Parameters < org . restcomm . media . core . control . mgcp . message . MgcpParameterType > parameters = new org . restcomm . media . core . control . mgcp . util . collections . Parameters ( ) ; final org . restcomm . media . core . control . mgcp . endpoint . MgcpEndpointManager endpointManager = mock ( org . restcomm . media . core . control . mgcp . endpoint . MgcpEndpointManager . class ) ; final org . restcomm . media . core . control . mgcp . pkg . MgcpPackageManager packageManager = mock ( org . restcomm . media . core . control . mgcp . pkg . MgcpPackageManager . class ) ; final org . restcomm . media . core . control . mgcp . call . MgcpCallManager callManager = mock ( org . restcomm . media . core . control . mgcp . call . MgcpCallManager . class ) ; final org . restcomm . media . core . control . mgcp . pkg . MgcpSignalProvider signalProvider = mock ( org . restcomm . media . core . control . mgcp . pkg . MgcpSignalProvider . class ) ; final org . restcomm . media . core . control . mgcp . command . MgcpCommandProvider commandProvider = new org . restcomm . media . core . control . mgcp . command . MgcpCommandProvider ( endpointManager , packageManager , signalProvider , callManager ) ; org . restcomm . media . core . control . mgcp . command . MgcpCommand command = commandProvider . provide ( MgcpRequestType . AUCX , transactionId , parameters ) ; "<AssertPlaceHolder>" ; } provide ( org . restcomm . media . core . control . mgcp . message . MgcpRequestType , int , org . restcomm . media . core . control . mgcp . util . collections . Parameters ) { switch ( type ) { case CRCX : return new org . restcomm . media . core . control . mgcp . command . CreateConnectionCommand ( transactionId , parameters , this . endpointManager ) ; case MDCX : return new org . restcomm . media . core . control . mgcp . command . ModifyConnectionCommand ( transactionId , parameters , this . endpointManager ) ; case DLCX : return new org . restcomm . media . core . control . mgcp . command . DeleteConnectionCommand ( transactionId , parameters , this . endpointManager ) ; case RQNT : return new org . restcomm . media . core . control . mgcp . command . RequestNotificationCommand ( transactionId , parameters , this . endpointManager , this . packageManager , this . signalProvider ) ; case AUCX : return new org . restcomm . media . core . control . mgcp . command . AuditConnectionCommand ( transactionId , parameters , this . endpointManager ) ; case AUEP : return new org . restcomm . media . core . control . mgcp . command . AuditEndpointCommand ( transactionId , parameters , this . endpointManager ) ; default : throw new java . lang . IllegalArgumentException ( ( "Unsupported<sp>command<sp>type<sp>" + ( type . name ( ) ) ) ) ; } } | org . junit . Assert . assertTrue ( ( command instanceof org . restcomm . media . core . control . mgcp . command . AuditConnectionCommand ) ) |
testWriteWithDocumentReadBytesDifferentThreads ( ) { try ( final net . openhft . chronicle . queue . impl . single . ChronicleQueue queue = builder ( getTmpDir ( ) , wireType ) . build ( ) ) { final java . lang . String expected = "some<sp>long<sp>message" ; net . openhft . chronicle . queue . impl . single . ExecutorService service1 = net . openhft . chronicle . queue . impl . single . Executors . newSingleThreadExecutor ( ) ; net . openhft . chronicle . queue . impl . single . ScheduledExecutorService service2 = null ; try { net . openhft . chronicle . queue . impl . single . Future f = service1 . submit ( ( ) -> { final net . openhft . chronicle . queue . impl . single . ExcerptAppender appender = queue . acquireAppender ( ) ; try ( final net . openhft . chronicle . queue . impl . single . DocumentContext dc = appender . writingDocument ( ) ) { dc . wire ( ) . writeEventName ( ( ) -> "key" ) . text ( expected ) ; } } ) ; net . openhft . chronicle . queue . impl . single . BlockingQueue < net . openhft . chronicle . queue . impl . single . Bytes > result = new net . openhft . chronicle . queue . impl . single . ArrayBlockingQueue ( 10 ) ; service2 = net . openhft . chronicle . queue . impl . single . Executors . newSingleThreadScheduledExecutor ( ) ; service2 . scheduleAtFixedRate ( ( ) -> { net . openhft . chronicle . queue . impl . single . Bytes b = net . openhft . chronicle . queue . impl . single . Bytes . elasticHeapByteBuffer ( 128 ) ; final net . openhft . chronicle . queue . impl . single . ExcerptTailer tailer = queue . createTailer ( ) ; tailer . readBytes ( b ) ; if ( ( b . readRemaining ( ) ) == 0 ) return ; b . readPosition ( 0 ) ; result . add ( b ) ; throw new net . openhft . chronicle . queue . impl . single . RejectedExecutionException ( ) ; } , 1 , 1 , TimeUnit . MICROSECONDS ) ; final net . openhft . chronicle . queue . impl . single . Bytes bytes = result . poll ( 5 , TimeUnit . SECONDS ) ; if ( bytes == null ) { f . get ( 1 , TimeUnit . SECONDS ) ; throw new java . lang . NullPointerException ( "nothing<sp>in<sp>result" ) ; } try { final java . lang . String actual = this . wireType . apply ( bytes ) . read ( ( ) -> "key" ) . text ( ) ; "<AssertPlaceHolder>" ; f . get ( 1 , TimeUnit . SECONDS ) ; } finally { bytes . release ( ) ; } } finally { service1 . shutdownNow ( ) ; if ( service2 != null ) service2 . shutdownNow ( ) ; } } } read ( net . openhft . chronicle . queue . impl . single . ExcerptTailer ) { try ( final net . openhft . chronicle . wire . DocumentContext dc = tailer . readingDocument ( ) ) { if ( ! ( dc . isPresent ( ) ) ) { return null ; } final java . io . ObjectInput in = dc . wire ( ) . objectInput ( ) ; return new net . openhft . chronicle . queue . impl . single . DuplicateMessageReadTest . Data ( in . readInt ( ) ) ; } } | org . junit . Assert . assertEquals ( expected , actual ) |
setDatacontainerValues_configuratorURL_SUBSCRIPTION ( ) { org . oscm . domobjects . Product prod = createProduct ( 1 , 1 , ServiceType . SUBSCRIPTION ) ; org . oscm . domobjects . Product copy = new org . oscm . domobjects . Product ( ) ; prod . setDatacontainerValues ( copy , ServiceType . SUBSCRIPTION ) ; "<AssertPlaceHolder>" ; } getConfiguratorUrl ( ) { return vo . getConfiguratorUrl ( ) ; } | org . junit . Assert . assertEquals ( null , copy . getConfiguratorUrl ( ) ) |
testEmpty ( ) { eu . europa . esig . dss . validation . DiagnosticDataBuilder ddb = new eu . europa . esig . dss . validation . DiagnosticDataBuilder ( ) ; eu . europa . esig . dss . jaxb . diagnostic . DiagnosticData dd = ddb . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { documentDom = buildRootDocumentDom ( ) ; deterministicId = params . getDeterministicId ( ) ; final java . util . List < eu . europa . esig . dss . xades . DSSReference > references = params . getReferences ( ) ; if ( eu . europa . esig . dss . utils . Utils . isCollectionEmpty ( references ) ) { final java . util . List < eu . europa . esig . dss . xades . DSSReference > defaultReferences = createDefaultReferences ( ) ; params . setReferences ( defaultReferences ) ; } incorporateFiles ( ) ; incorporateSignatureDom ( ) ; incorporateSignedInfo ( ) ; incorporateSignatureValue ( ) ; incorporateKeyInfo ( ) ; incorporateObject ( ) ; incorporateReferences ( ) ; incorporateReferenceSignedProperties ( ) ; byte [ ] canonicalizedSignedInfo = eu . europa . esig . dss . xades . DSSXMLUtils . canonicalizeSubtree ( signedInfoCanonicalizationMethod , signedInfoDom ) ; if ( eu . europa . esig . dss . xades . signature . XAdESSignatureBuilder . LOG . isTraceEnabled ( ) ) { eu . europa . esig . dss . xades . signature . XAdESSignatureBuilder . LOG . trace ( "Canonicalized<sp>SignedInfo<sp>--><sp>{}" , new java . lang . String ( canonicalizedSignedInfo ) ) ; final byte [ ] digest = eu . europa . esig . dss . DSSUtils . digest ( DigestAlgorithm . SHA256 , canonicalizedSignedInfo ) ; eu . europa . esig . dss . xades . signature . XAdESSignatureBuilder . LOG . trace ( "Canonicalized<sp>SignedInfo<sp>SHA256<sp>--><sp>{}" , eu . europa . esig . dss . utils . Utils . toBase64 ( digest ) ) ; } built = true ; return canonicalizedSignedInfo ; } | org . junit . Assert . assertNotNull ( dd ) |
testStateRecommend ( ) { com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription containerDescription = com . vmware . admiral . request . util . TestRequestStateFactory . createContainerDescription ( ) ; com . vmware . admiral . compute . container . ContainerService . ContainerState containerState = com . vmware . admiral . request . util . TestRequestStateFactory . createContainer ( ) ; containerState . powerState = com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState . ERROR ; java . util . List < com . vmware . admiral . request . ContainerDiff > containerDiffs = com . vmware . admiral . request . ContainerDiff . inspect ( containerDescription , com . google . common . collect . Lists . newArrayList ( containerState ) ) ; "<AssertPlaceHolder>" ; } recommend ( com . vmware . admiral . request . ContainerDiff ) { if ( diff == null ) { throw new com . vmware . xenon . common . LocalizableValidationException ( com . vmware . admiral . request . ContainerRecommendation . INSPECTED_CONTAINER_STATES_NOT_PROVIDED , com . vmware . admiral . request . ContainerRecommendation . INSPECTED_CONTAINER_STATES_NOT_PROVIDED_CODE ) ; } java . util . function . Predicate < com . vmware . admiral . request . ContainerDiff . ContainerPropertyDiff > envPredicate = ( d ) -> java . util . Objects . equals ( ContainerDescription . FIELD_NAME_ENV , d . containerDescriptionPropertyName ) ; java . util . function . Predicate < com . vmware . admiral . request . ContainerDiff . ContainerPropertyDiff > statePredicate = ( d ) -> java . util . Objects . equals ( ContainerState . FIELD_NAME_POWER_STATE , d . containerStatePropertyName ) ; if ( diff . diffs . stream ( ) . anyMatch ( envPredicate . or ( statePredicate ) ) ) { return com . vmware . admiral . request . ContainerRecommendation . Recommendation . REDEPLOY ; } return com . vmware . admiral . request . ContainerRecommendation . Recommendation . NONE ; } | org . junit . Assert . assertEquals ( ContainerRecommendation . Recommendation . REDEPLOY , com . vmware . admiral . request . ContainerRecommendation . recommend ( containerDiffs . get ( 0 ) ) ) |
givenIntegerArray_whenSortedWithThreeWayQuickSort_thenGetSortedArray ( ) { int [ ] actual = new int [ ] { 3 , 5 , 5 , 5 , 3 , 7 , 7 , 3 , 5 , 5 , 7 , 3 , 3 } ; int [ ] expected = new int [ ] { 3 , 3 , 3 , 3 , 3 , 5 , 5 , 5 , 5 , 5 , 7 , 7 , 7 } ; com . baeldung . algorithms . quicksort . ThreeWayQuickSort . threeWayQuickSort ( actual , 0 , ( ( actual . length ) - 1 ) ) ; "<AssertPlaceHolder>" ; } threeWayQuickSort ( int [ ] , int , int ) { if ( end <= begin ) return ; int i = begin ; int less = begin ; int greater = end ; while ( i <= greater ) { if ( ( a [ i ] ) < ( a [ less ] ) ) { int tmp = a [ i ] ; a [ i ] = a [ less ] ; a [ less ] = tmp ; i ++ ; less ++ ; } else if ( ( a [ less ] ) < ( a [ i ] ) ) { int tmp = a [ i ] ; a [ i ] = a [ greater ] ; a [ greater ] = tmp ; greater -- ; } else { i ++ ; } } com . baeldung . algorithms . quicksort . ThreeWayQuickSort . threeWayQuickSort ( a , begin , ( less - 1 ) ) ; com . baeldung . algorithms . quicksort . ThreeWayQuickSort . threeWayQuickSort ( a , ( greater + 1 ) , end ) ; } | org . junit . Assert . assertArrayEquals ( expected , actual ) |
testTrimOnNullInputReturnsNull ( ) { "<AssertPlaceHolder>" ; } trim ( ) { return ( ( rx . functions . Func1 < T , java . lang . String > ) ( com . github . davidmoten . rx . Strings . TRIM ) ) ; } | org . junit . Assert . assertNull ( com . github . davidmoten . rx . Strings . trim ( ) . call ( null ) ) |
testNoMatch ( ) { java . lang . String givenBootstrapMainClass = "some.other.main.class" ; com . navercorp . pinpoint . common . util . SimpleProperty property = com . navercorp . pinpoint . bootstrap . resolver . condition . MainClassConditionTest . createTestProperty ( givenBootstrapMainClass ) ; com . navercorp . pinpoint . bootstrap . resolver . condition . MainClassCondition mainClassCondition = new com . navercorp . pinpoint . bootstrap . resolver . condition . MainClassCondition ( property ) ; boolean matches = mainClassCondition . check ( com . navercorp . pinpoint . bootstrap . resolver . condition . MainClassConditionTest . TEST_MAIN_CLASS ) ; "<AssertPlaceHolder>" ; } check ( java . lang . String ) { if ( com . navercorp . pinpoint . common . util . StringUtils . isEmpty ( requiredKey ) ) { return false ; } if ( ( this . property . getProperty ( requiredKey ) ) != null ) { logger . debug ( "Property<sp>'{}'<sp>found<sp>in<sp>[{}]" , requiredKey , this . property . getClass ( ) . getSimpleName ( ) ) ; return true ; } else { logger . debug ( "Property<sp>'{}'<sp>not<sp>found<sp>in<sp>[{}]" , requiredKey , this . property . getClass ( ) . getSimpleName ( ) ) ; return false ; } } | org . junit . Assert . assertFalse ( matches ) |
testMarshalUnmarshal ( ) { org . apache . camel . spi . DataFormat avro = new org . apache . camel . dataformat . avro . AvroDataFormat ( getSchema ( ) ) ; org . apache . avro . generic . GenericRecord input = new org . apache . avro . generic . GenericData . Record ( getSchema ( ) ) ; input . put ( "name" , "Kermit" ) ; org . apache . camel . CamelContext camelctx = new org . apache . camel . impl . DefaultCamelContext ( ) ; camelctx . addRoutes ( new org . apache . camel . builder . RouteBuilder ( ) { @ org . wildfly . camel . test . avro . Override public void configure ( ) throws org . wildfly . camel . test . avro . Exception { from ( "direct:start" ) . marshal ( avro ) . unmarshal ( avro ) ; } } ) ; camelctx . start ( ) ; try { org . apache . camel . ProducerTemplate producer = camelctx . createProducerTemplate ( ) ; org . apache . avro . generic . GenericRecord result = producer . requestBody ( "direct:start" , input , org . apache . avro . generic . GenericRecord . class ) ; "<AssertPlaceHolder>" ; } finally { camelctx . stop ( ) ; } } get ( java . lang . String ) { synchronized ( org . wildfly . extension . camel . deployment . CamelDeploymentSettings . deploymentSettingsMap ) { return org . wildfly . extension . camel . deployment . CamelDeploymentSettings . deploymentSettingsMap . get ( name ) ; } } | org . junit . Assert . assertEquals ( "Kermit" , result . get ( "name" ) . toString ( ) ) |
createOrModifiedTest02 ( ) { org . bugkillers . core . model . Tag tag = new org . bugkillers . core . model . Tag ( ) ; tag . setTagName ( "Java" ) ; tag . setTagDes ( "Java" ) ; tag . setTagPic ( "url:/sfsfsdfs" ) ; tag . setId ( 1 ) ; tagService . createOrModifiedTag ( tag ) ; "<AssertPlaceHolder>" ; } createOrModifiedTag ( org . bugkillers . core . model . Tag ) { org . bugkillers . core . result . BaseResult < org . bugkillers . core . model . Tag > result = new org . bugkillers . core . result . BaseResult ( ) ; org . bugkillers . core . domain . TagDO tagDO = new org . bugkillers . core . domain . TagDO ( ) ; beanMapper . copy ( tag , tagDO ) ; tagDO . setGroupId ( 1 ) ; org . bugkillers . core . util . FillAttributeUtil . fillNecessaryAttribute ( tagDO , org . bugkillers . core . domain . TagDO . class ) ; if ( ( tagDO . getId ( ) ) != null ) { tagDOMapper . updateByPrimaryKey ( tagDO ) ; } else { tagDOMapper . insert ( tagDO ) ; } return result . setRet ( true ) ; } | org . junit . Assert . assertTrue ( true ) |
testGetProto ( ) { org . apache . tajo . catalog . proto . CatalogProtos . TableProto proto = meta . getProto ( ) ; org . apache . tajo . catalog . TableMeta newMeta = new org . apache . tajo . catalog . TableMeta ( proto ) ; "<AssertPlaceHolder>" ; } getProto ( ) { return TajoIdProtos . QueryUnitIdProto . newBuilder ( ) . setExecutionBlockId ( executionBlockId . getProto ( ) ) . setId ( id ) . build ( ) ; } | org . junit . Assert . assertEquals ( meta , newMeta ) |
testGetType ( ) { final java . lang . Class < ? > type = java . lang . String . class ; final net . greghaines . jesque . worker . UnpermittedJobException upje = new net . greghaines . jesque . worker . UnpermittedJobException ( type ) ; "<AssertPlaceHolder>" ; } getType ( ) { return this . type ; } | org . junit . Assert . assertEquals ( type , upje . getType ( ) ) |
distinctFilterTest ( ) { sm . defineStream ( "define<sp>stream<sp>testStream<sp>(c1<sp>string,<sp>c2<sp>float,<sp>c3<sp>int);" ) ; sm . addQuery ( "from<sp>testStream<sp>#window.stratio:distinct(c1)<sp>select<sp>c1,<sp>c2,c3<sp>insert<sp>into<sp>resultStream;" ) ; sm . addCallback ( "resultStream" , new org . wso2 . siddhi . core . stream . output . StreamCallback ( ) { @ com . stratio . decision . unit . siddhi . extension . window . Override public void receive ( org . wso2 . siddhi . core . event . Event [ ] events ) { for ( org . wso2 . siddhi . core . event . Event event : events ) { if ( event instanceof org . wso2 . siddhi . core . event . in . InEvent ) { count . getAndIncrement ( ) ; } } } } ) ; sm . getInputHandler ( "testStream" ) . send ( new java . lang . Object [ ] { new java . lang . String ( "KEY_A" ) , new java . lang . Float ( 10 ) , new java . lang . Integer ( 20 ) } ) ; sm . getInputHandler ( "testStream" ) . send ( new java . lang . Object [ ] { new java . lang . String ( "KEY_A" ) , new java . lang . Float ( 20 ) , new java . lang . Integer ( 30 ) } ) ; sm . getInputHandler ( "testStream" ) . send ( new java . lang . Object [ ] { new java . lang . String ( "KEY_A" ) , new java . lang . Float ( 30 ) , new java . lang . Integer ( 40 ) } ) ; sm . getInputHandler ( "testStream" ) . send ( new java . lang . Object [ ] { new java . lang . String ( "KEY_B" ) , new java . lang . Float ( 30 ) , new java . lang . Integer ( 40 ) } ) ; java . lang . Thread . sleep ( 500 ) ; "<AssertPlaceHolder>" ; } addQuery ( com . stratio . decision . commons . messages . StreamQuery ) { this . queries . add ( query ) ; } | org . junit . Assert . assertEquals ( 2 , count . get ( ) ) |
testProviderCreateW3CEndpointReference ( ) { org . apache . cxf . jaxws . spi . ProviderImpl provider = new org . apache . cxf . jaxws . spi . ProviderImpl ( ) ; java . io . InputStream is = getClass ( ) . getResourceAsStream ( "resources/hello_world_soap_http_infoset.xml" ) ; org . w3c . dom . Document doc = org . apache . cxf . staxutils . StaxUtils . read ( is ) ; org . w3c . dom . Element referenceParameter = org . apache . cxf . jaxws . EndpointReferenceTest . fetchElementByNameAttribute ( doc . getDocumentElement ( ) , "wsa:ReferenceParameters" , "" ) ; java . util . List < org . w3c . dom . Element > referenceParameters = new java . util . ArrayList ( ) ; if ( referenceParameter != null ) { referenceParameters . add ( referenceParameter ) ; } org . w3c . dom . Element metadata = org . apache . cxf . jaxws . EndpointReferenceTest . fetchElementByNameAttribute ( doc . getDocumentElement ( ) , "wsa:metadata" , "" ) ; java . util . List < org . w3c . dom . Element > metadataList = new java . util . ArrayList ( ) ; if ( metadata != null ) { metadataList . add ( metadata ) ; } javax . xml . ws . wsaddressing . W3CEndpointReference endpointReference = provider . createW3CEndpointReference ( "http://localhost:8080/test" , serviceName , portName , metadataList , "wsdlDocumentLocation" , referenceParameters ) ; "<AssertPlaceHolder>" ; } createW3CEndpointReference ( java . lang . String , javax . xml . namespace . QName , javax . xml . namespace . QName , java . util . List , java . lang . String , java . util . List ) { return createW3CEndpointReference ( address , null , serviceName , portName , metadata , wsdlDocumentLocation , referenceParameters , null , null ) ; } | org . junit . Assert . assertNotNull ( endpointReference ) |
testSwapEmptyIntArray ( ) { final int [ ] array = new int [ 0 ] ; org . apache . commons . lang3 . ArrayUtils . swap ( array , 0 , 2 ) ; "<AssertPlaceHolder>" ; } swap ( java . lang . Object [ ] , int , int ) { if ( ( array == null ) || ( ( array . length ) == 0 ) ) { return ; } org . apache . commons . lang3 . ArrayUtils . swap ( array , offset1 , offset2 , 1 ) ; } | org . junit . Assert . assertEquals ( 0 , array . length ) |
testM4Tokens0 ( ) { java . lang . String text = "while_stuff<sp>incase" ; org . eclipse . jface . text . IDocument document = createDocument ( text ) ; java . util . List < org . eclipse . cdt . autotools . ui . editors . parser . Token > tokens = tokenize ( document , true ) ; checkNoErrors ( ) ; "<AssertPlaceHolder>" ; checkToken ( tokens . get ( 0 ) , document , ITokenConstants . WORD , "while_stuff" ) ; checkToken ( tokens . get ( 1 ) , document , ITokenConstants . WORD , "incase" ) ; } size ( ) { return fSize ; } | org . junit . Assert . assertEquals ( 2 , tokens . size ( ) ) |
suggestionCaegoriesNotEmpty ( ) { java . util . List < org . agorava . twitter . model . SuggestionCategory > res = userService . getSuggestionCategories ( ) ; "<AssertPlaceHolder>" ; } getSuggestionCategories ( ) { return getService ( ) . get ( buildAbsoluteUri ( org . agorava . twitter . impl . TwitterUserServiceImpl . SUGGESTION_CATEGORIES ) , org . agorava . twitter . impl . TwitterUserServiceImpl . SuggestionCategoryList . class ) ; } | org . junit . Assert . assertFalse ( res . isEmpty ( ) ) |
testGetDefaultSkuSingle ( ) { final org . yes . cart . domain . entity . ProductSku sku1 = context . mock ( org . yes . cart . domain . entity . ProductSku . class , "sku1" ) ; org . yes . cart . domain . entity . impl . ProductEntity pe = new org . yes . cart . domain . entity . impl . ProductEntity ( ) ; pe . setSku ( java . util . Collections . singleton ( sku1 ) ) ; "<AssertPlaceHolder>" ; } getDefaultSku ( ) { if ( ( defaultProductSku ) == null ) { if ( ( ( this . getSku ( ) ) != null ) && ( ! ( this . getSku ( ) . isEmpty ( ) ) ) ) { if ( isMultiSkuProduct ( ) ) { int rank = Integer . MIN_VALUE ; for ( org . yes . cart . domain . entity . impl . ProductSku productSku : this . getSku ( ) ) { if ( ( productSku . getRank ( ) ) > rank ) { defaultProductSku = productSku ; rank = productSku . getRank ( ) ; } } if ( ( defaultProductSku ) == null ) { defaultProductSku = this . getSku ( ) . iterator ( ) . next ( ) ; } } else { defaultProductSku = this . getSku ( ) . iterator ( ) . next ( ) ; } } } return defaultProductSku ; } | org . junit . Assert . assertSame ( sku1 , pe . getDefaultSku ( ) ) |
testFilterNietTeLeverenPersonenVoorDoelbindingBinnenPopulatie ( ) { final nl . bzk . brp . domain . algemeen . Autorisatiebundel leveringAutorisatie = maakAutorisatiebudel ( SoortDienst . MUTATIELEVERING_OP_BASIS_VAN_DOELBINDING ) ; final nl . bzk . brp . domain . algemeen . Populatie populatie = nl . bzk . brp . domain . algemeen . Populatie . BINNEN ; final boolean resultaat = populatieBepalingFilterImpl . magLeveren ( testPersoon , populatie , leveringAutorisatie ) ; "<AssertPlaceHolder>" ; } magLeveren ( nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst , nl . bzk . brp . domain . algemeen . Populatie , nl . bzk . brp . domain . algemeen . Autorisatiebundel ) { final nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst soortDienst = autorisatiebundel . getDienst ( ) . getSoortDienst ( ) ; if ( ! ( ( ( soortDienst == ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst . ATTENDERING ) ) || ( soortDienst == ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst . SELECTIE ) ) ) || ( soortDienst == ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst . MUTATIELEVERING_OP_BASIS_VAN_AFNEMERINDICATIE ) ) ) ) { return true ; } final nl . bzk . algemeenbrp . dal . domein . brp . entity . Partij partij = autorisatiebundel . getPartij ( ) ; final boolean leveringMagDoorgaan ; if ( soortDienst == ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst . MUTATIELEVERING_OP_BASIS_VAN_AFNEMERINDICATIE ) ) { boolean heeftVerstrekkingsBeperkingVorigeHandeling = ( ( persoon . beeldVan ( ) . vorigeHandeling ( ) ) != null ) && ( verstrekkingsbeperkingService . heeftGeldigeVerstrekkingsbeperking ( persoon . beeldVan ( ) . vorigeHandeling ( ) , partij ) ) ; boolean heeftVertrekkingsbeperkingNu = verstrekkingsbeperkingService . heeftGeldigeVerstrekkingsbeperking ( persoon . getNuNuBeeld ( ) , partij ) ; leveringMagDoorgaan = ! ( heeftVerstrekkingsBeperkingVorigeHandeling && heeftVertrekkingsbeperkingNu ) ; if ( ! leveringMagDoorgaan ) { nl . bzk . brp . service . mutatielevering . leveringbepaling . filter . VerstrekkingsbeperkingfilterImpl . LOGGER . debug ( ( "Levering<sp>voor<sp>mutatielevering<sp>obv<sp>afnemerindicatie<sp>mag<sp>niet<sp>doorgaan,<sp>er<sp>geldt<sp>een<sp>" + "verstrekkingsbeperking<sp>voor<sp>persoon<sp>{}<sp>op<sp>partij<sp>{}" ) , persoon . getId ( ) , partij . getCode ( ) ) ; } } else { leveringMagDoorgaan = ! ( verstrekkingsbeperkingService . heeftGeldigeVerstrekkingsbeperking ( persoon . getNuNuBeeld ( ) , partij ) ) ; if ( ! leveringMagDoorgaan ) { nl . bzk . brp . service . mutatielevering . leveringbepaling . filter . VerstrekkingsbeperkingfilterImpl . LOGGER . debug ( ( "Levering<sp>mag<sp>niet<sp>doorgaan,<sp>er<sp>geldt<sp>een<sp>" + "verstrekkingsbeperking<sp>voor<sp>persoon<sp>{}<sp>op<sp>partij<sp>{}" ) , persoon . getId ( ) , partij . getCode ( ) ) ; } } return leveringMagDoorgaan ; } | org . junit . Assert . assertTrue ( resultaat ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . layout . page . template . model . LayoutPageTemplateStructure missingLayoutPageTemplateStructure = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; } | org . junit . Assert . assertNull ( missingLayoutPageTemplateStructure ) |
testSerialization ( ) { org . jfree . data . statistics . DefaultBoxAndWhiskerCategoryDataset d1 = new org . jfree . data . statistics . DefaultBoxAndWhiskerCategoryDataset ( ) ; d1 . add ( new org . jfree . data . statistics . BoxAndWhiskerItem ( new java . lang . Double ( 1.0 ) , new java . lang . Double ( 2.0 ) , new java . lang . Double ( 3.0 ) , new java . lang . Double ( 4.0 ) , new java . lang . Double ( 5.0 ) , new java . lang . Double ( 6.0 ) , new java . lang . Double ( 7.0 ) , new java . lang . Double ( 8.0 ) , new java . util . ArrayList ( ) ) , "ROW1" , "COLUMN1" ) ; org . jfree . data . statistics . DefaultBoxAndWhiskerCategoryDataset d2 = ( ( org . jfree . data . statistics . DefaultBoxAndWhiskerCategoryDataset ) ( org . jfree . chart . TestUtils . serialised ( d1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; } | org . junit . Assert . assertEquals ( d1 , d2 ) |
testCompare_MassNumberIntegers_ValueOf ( ) { org . openscience . cdk . silent . Isotope iso = new org . openscience . cdk . silent . Isotope ( "C" ) ; iso . setMassNumber ( java . lang . Integer . valueOf ( 12 ) ) ; org . openscience . cdk . silent . Isotope iso2 = new org . openscience . cdk . silent . Isotope ( "C" ) ; iso2 . setMassNumber ( java . lang . Integer . valueOf ( 12 ) ) ; "<AssertPlaceHolder>" ; } compare ( java . lang . Object ) { if ( object instanceof org . openscience . cdk . isomorphism . matchers . IQueryBond ) { org . openscience . cdk . isomorphism . matchers . QueryBond queryBond = ( ( org . openscience . cdk . isomorphism . matchers . QueryBond ) ( object ) ) ; for ( org . openscience . cdk . interfaces . IAtom atom : atoms ) { if ( ! ( queryBond . contains ( atom ) ) ) { return false ; } } return true ; } return false ; } | org . junit . Assert . assertTrue ( iso . compare ( iso2 ) ) |
test_getBundleVersion_noMainAttr ( ) { java . util . jar . Manifest manifest = org . mockito . Mockito . mock ( java . util . jar . Manifest . class ) ; java . lang . String bundleVersion = org . talend . commons . utils . resource . BundleFileUtil . getBundleVersion ( manifest ) ; "<AssertPlaceHolder>" ; } getBundleVersion ( java . util . jar . Manifest ) { if ( manifest == null ) { return null ; } java . util . jar . Attributes mainAttributes = manifest . getMainAttributes ( ) ; if ( mainAttributes == null ) { return null ; } return mainAttributes . getValue ( "Bundle-Version" ) ; } | org . junit . Assert . assertNull ( bundleVersion ) |
byConsumer ( ) { org . candlepin . model . Consumer c = mock ( org . candlepin . model . Consumer . class ) ; when ( c . getUuid ( ) ) . thenReturn ( "abcde" ) ; org . candlepin . model . DeletedConsumer found = dcc . findByConsumer ( c ) ; "<AssertPlaceHolder>" ; } getConsumerUuid ( ) { return consumerUuid ; } | org . junit . Assert . assertEquals ( "abcde" , found . getConsumerUuid ( ) ) |
testSetLunOffline2 ( ) { com . iwave . ext . netapp . Lun lun = new com . iwave . ext . netapp . Lun ( com . iwave . ext . netapp . LunTest . server , com . iwave . ext . netapp . LunTest . LUN_PATH ) ; boolean result = lun . setLunOnline ( false , false ) ; "<AssertPlaceHolder>" ; } setLunOnline ( java . lang . String , boolean ) { if ( log . isDebugEnabled ( ) ) { log . debug ( ( ( ( "Setting<sp>LUN<sp>online.<sp>Params<sp>[lunPath,forceOnline]:<sp>" + lunPath ) + ",<sp>" ) + forceOnline ) ) ; } com . iwave . ext . netapp . Lun lun = new com . iwave . ext . netapp . Lun ( server . getNaServer ( ) , lunPath ) ; boolean result = lun . setLunOnline ( true , forceOnline ) ; return result ; } | org . junit . Assert . assertTrue ( result ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.