input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testSuite54 ( ) { try ( java . io . InputStream input = org . geotools . ysld . YsldTests . ysld ( "poly" , "suite-54.ysld" ) ) { org . geotools . styling . StyledLayerDescriptor sld = org . geotools . ysld . Ysld . parse ( input ) ; org . geotools . styling . Style style = org . geotools . styling . SLD . styles ( sld ) [ 0 ] ; org . geotools . styling . TextSymbolizer text = org . geotools . styling . SLD . textSymbolizer ( style ) ; org . geotools . styling . LabelPlacement placement = text . getLabelPlacement ( ) ; "<AssertPlaceHolder>" ; } } getLabelPlacement ( ) { return placement ; } | org . junit . Assert . assertNotNull ( placement ) |
coercingHeterogeneousAppleSourceGroups ( ) { java . lang . reflect . Type type = com . facebook . buck . rules . coercer . TypeCoercerTest . TestFields . class . getField ( "listOfSourcesWithFlags" ) . getGenericType ( ) ; com . facebook . buck . rules . coercer . TypeCoercer < ? > coercer = typeCoercerFactory . typeCoercerForType ( type ) ; com . google . common . collect . ImmutableList < ? > input = com . google . common . collect . ImmutableList . of ( "Group1/foo.m" , com . google . common . collect . ImmutableList . of ( "Group1/bar.m" , com . google . common . collect . ImmutableList . of ( "-Wall" , "-Werror" ) ) , "Group2/baz.m" , com . google . common . collect . ImmutableList . of ( "Group2/blech.m" , com . google . common . collect . ImmutableList . of ( "-fobjc-arc" ) ) ) ; java . lang . Object result = coercer . coerce ( cellRoots , filesystem , java . nio . file . Paths . get ( "" ) , EmptyTargetConfiguration . INSTANCE , input ) ; com . google . common . collect . ImmutableList < com . facebook . buck . core . sourcepath . SourceWithFlags > expectedResult = com . google . common . collect . ImmutableList . of ( com . facebook . buck . core . sourcepath . SourceWithFlags . of ( com . facebook . buck . core . sourcepath . FakeSourcePath . of ( "Group1/foo.m" ) ) , com . facebook . buck . core . sourcepath . SourceWithFlags . of ( com . facebook . buck . core . sourcepath . FakeSourcePath . of ( "Group1/bar.m" ) , com . google . common . collect . ImmutableList . of ( "-Wall" , "-Werror" ) ) , com . facebook . buck . core . sourcepath . SourceWithFlags . of ( com . facebook . buck . core . sourcepath . FakeSourcePath . of ( "Group2/baz.m" ) ) , com . facebook . buck . core . sourcepath . SourceWithFlags . of ( com . facebook . buck . core . sourcepath . FakeSourcePath . of ( "Group2/blech.m" ) , com . google . common . collect . ImmutableList . of ( "-fobjc-arc" ) ) ) ; "<AssertPlaceHolder>" ; } of ( com . facebook . buck . core . config . BuckConfig ) { return new com . facebook . buck . event . chrome_trace . ChromeTraceBuckConfig ( delegate ) ; } | org . junit . Assert . assertEquals ( expectedResult , result ) |
testIsGatewayPersistentWithNullGatewayQueueAttributes ( ) { final com . gemstone . gemfire . cache . util . Gateway mockGateway = mockContext . mock ( com . gemstone . gemfire . cache . util . Gateway . class , "Gateway" ) ; mockContext . checking ( new org . jmock . Expectations ( ) { { oneOf ( mockGateway ) . getQueueAttributes ( ) ; will ( returnValue ( null ) ) ; } } ) ; final com . gemstone . gemfire . management . internal . cli . functions . DescribeDiskStoreFunction function = createDescribeDiskStoreFunction ( null ) ; "<AssertPlaceHolder>" ; } isPersistent ( com . gemstone . gemfire . cache . Region ) { return com . gemstone . gemfire . management . internal . cli . functions . DescribeDiskStoreFunction . PERSISTENT_DATA_POLICIES . contains ( region . getAttributes ( ) . getDataPolicy ( ) ) ; } | org . junit . Assert . assertFalse ( function . isPersistent ( mockGateway ) ) |
getInstanceFunctionsForResourceTypeShouldDelegateResultFromRepository ( ) { ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceTypeEntity resourceType = createResourceType ( "ResourceType" , 1 , functionA_ID_3 ) ; when ( resourceTypeRepositoryMock . loadWithFunctionsAndMiksForId ( resourceType . getId ( ) ) ) . thenReturn ( resourceType ) ; ch . puzzle . itc . mobiliar . business . function . boundary . List < ch . puzzle . itc . mobiliar . business . function . entity . AmwFunctionEntity > instanceFunctions = functionsBoundary . getInstanceFunctions ( resourceType ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { ch . puzzle . itc . mobiliar . common . util . DefaultResourceTypeDefinition [ ] values = ch . puzzle . itc . mobiliar . common . util . DefaultResourceTypeDefinition . values ( ) ; for ( ch . puzzle . itc . mobiliar . common . util . DefaultResourceTypeDefinition value : values ) { if ( value . name ( ) . equals ( name ) ) { return true ; } } return false ; } | org . junit . Assert . assertTrue ( instanceFunctions . contains ( functionA_ID_3 ) ) |
testGetCurrentThreadCount ( ) { System . out . println ( "getCurrentThreadCount" ) ; long now = java . lang . System . currentTimeMillis ( ) ; org . apache . jmeter . samplers . SampleResult sample = new org . apache . jmeter . samplers . SampleResult ( ) ; sample . setGroupThreads ( 3 ) ; sample . setThreadName ( "test_tg" ) ; sample . setStampAndTime ( now , 300 ) ; kg . apc . jmeter . graphs . AbstractVsThreadVisualizer instance = new kg . apc . jmeter . graphs . AbstractVsThreadVisualizerTest . AbstractVsThreadVisualizerImpl ( ) ; instance . add ( sample ) ; int expResult = 3 ; int result = instance . getCurrentThreadCount ( sample ) ; "<AssertPlaceHolder>" ; } getCurrentThreadCount ( org . apache . jmeter . samplers . SampleResult ) { int ret ; if ( ( state . size ( ) ) > 1 ) { ret = 0 ; for ( kg . apc . charting . AbstractGraphRow abstractGraphRow : state . values ( ) ) { kg . apc . charting . AbstractGraphPanelChartElement element = abstractGraphRow . getLowerElement ( res . getStartTime ( ) ) ; if ( element != null ) ret += element . getValue ( ) ; } } else { ret = res . getGroupThreads ( ) ; } return ret ; } | org . junit . Assert . assertEquals ( expResult , result ) |
shouldBindAnyContentType ( ) { request . withContentType ( ContentType . Null ) ; request . withParameter ( "param1" , "1" ) ; com . threewks . thundr . introspection . ParameterDescription param1 = new com . threewks . thundr . introspection . ParameterDescription ( "param1" , int . class ) ; for ( com . threewks . thundr . http . ContentType contentType : com . threewks . thundr . http . ContentType . values ( ) ) { request . withContentType ( contentType ) ; parameterDescriptions = map ( param1 , null ) ; binder . bindAll ( parameterDescriptions , request , response ) ; "<AssertPlaceHolder>" ; } } get ( java . lang . String ) { return delegate . get ( java . util . Collections . singletonList ( arg0 ) ) ; } | org . junit . Assert . assertThat ( parameterDescriptions . get ( param1 ) , org . hamcrest . Matchers . is ( ( ( java . lang . Object ) ( 1 ) ) ) ) |
testInitInBuffer ( ) { org . hawkular . apm . client . collector . internal . FragmentBuilder builder = new org . hawkular . apm . client . collector . internal . FragmentBuilder ( ) ; builder . initInBuffer ( 1 ) ; "<AssertPlaceHolder>" ; } isInBufferActive ( java . lang . Object ) { return collector ( ) . isInBufferActive ( getRuleName ( ) , obj ) ; } | org . junit . Assert . assertTrue ( builder . isInBufferActive ( 1 ) ) |
testGetMaskedEdit_By_Name_Calls_FindFirst_Once ( ) { setElementTypeAndClassName ( elem , ControlType . Edit , "TAutomatedMaskEdit" ) ; mmarquee . automation . BaseAutomationTest . setElementCurrentName ( elem , "SMITH-01" ) ; when ( element . findFirst ( any ( ) , any ( ) ) ) . thenReturn ( targetElement ) ; mmarquee . automation . controls . AutomationMaskedEdit maskedEdit = wndw . getMaskedEdit ( mmarquee . automation . controls . Search . getBuilder ( "SMITH-01" ) . build ( ) ) ; "<AssertPlaceHolder>" ; verify ( element , atLeastOnce ( ) ) . findFirst ( any ( ) , any ( ) ) ; } getElement ( ) { return this . element ; } | org . junit . Assert . assertEquals ( targetElement , maskedEdit . getElement ( ) ) |
testRandom ( ) { org . apache . commons . math4 . stat . regression . SimpleRegression regression = new org . apache . commons . math4 . stat . regression . SimpleRegression ( ) ; java . util . Random random = new java . util . Random ( 1 ) ; int n = 100 ; for ( int i = 0 ; i < n ; i ++ ) { regression . addData ( ( ( ( double ) ( i ) ) / ( n - 1 ) ) , random . nextDouble ( ) ) ; } "<AssertPlaceHolder>" ; } getSignificance ( ) { if ( ( n ) < 3 ) { return Double . NaN ; } org . apache . commons . statistics . distribution . TDistribution distribution = new org . apache . commons . statistics . distribution . TDistribution ( ( ( n ) - 2 ) ) ; return 2.0 * ( 1.0 - ( distribution . cumulativeProbability ( ( ( org . apache . commons . math4 . util . FastMath . abs ( getSlope ( ) ) ) / ( getSlopeStdErr ( ) ) ) ) ) ) ; } | org . junit . Assert . assertTrue ( ( ( 0.0 < ( regression . getSignificance ( ) ) ) && ( ( regression . getSignificance ( ) ) < 1.0 ) ) ) |
empty_json_test ( ) { com . afollestad . ason . AsonArray < java . lang . Integer > array = new com . afollestad . ason . AsonArray ( ( ( java . lang . String ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( size ( ) ) == 0 ; } | org . junit . Assert . assertTrue ( array . isEmpty ( ) ) |
testNonFileResourceExists ( ) { leap . lang . resource . Resource resource = new leap . lang . resource . UrlResource ( "http://www.w3.org/" ) ; "<AssertPlaceHolder>" ; } exists ( ) { try { return getFile ( ) . exists ( ) ; } catch ( java . lang . Exception ex ) { try { leap . lang . resource . InputStream is = getInputStream ( ) ; is . close ( ) ; return true ; } catch ( java . lang . Throwable isEx ) { return false ; } } } | org . junit . Assert . assertTrue ( resource . exists ( ) ) |
test5005 ( ) { int noDraws = 500000 ; int [ ] trialss = new int [ ] { 50 } ; double [ ] probs = new double [ ] { 0.5 } ; int samplesLen = 1000 ; for ( int trials : trialss ) { for ( double prob : probs ) { long [ ] samplesBinomSampler = new long [ samplesLen ] ; long [ ] samplesB = new long [ samplesLen ] ; org . apache . commons . math3 . distribution . BinomialDistribution binDist = new org . apache . commons . math3 . distribution . BinomialDistribution ( trials , prob ) ; for ( int i = 0 ; i < noDraws ; i ++ ) { int pSample = cc . mallet . types . BinomialSampler . rbinom ( trials , prob ) ; ( samplesBinomSampler [ pSample ] ) ++ ; int binSample = binDist . sample ( ) ; ( samplesB [ binSample ] ) ++ ; } int [ ] rg = cc . mallet . topics . PoissonPolyaUrnTest . findSeqRange ( samplesB ) ; int smallestIdx = rg [ 0 ] ; int largestIdx = rg [ 1 ] ; int obsLen = largestIdx - smallestIdx ; long [ ] obsBinomSampler = new long [ obsLen ] ; long [ ] obsBin = new long [ obsLen ] ; for ( int i = smallestIdx ; i < largestIdx ; i ++ ) { obsBinomSampler [ ( i - smallestIdx ) ] = samplesBinomSampler [ i ] ; obsBin [ ( i - smallestIdx ) ] = samplesB [ i ] ; } org . apache . commons . math3 . stat . inference . ChiSquareTest cs = new org . apache . commons . math3 . stat . inference . ChiSquareTest ( ) ; double test1 = cs . chiSquareTestDataSetsComparison ( obsBin , obsBinomSampler ) ; if ( ! ( test1 > 0.01 ) ) { System . out . println ( ( "Test:" + test1 ) ) ; System . out . println ( ( "Trials:" + trials ) ) ; System . out . println ( ( "Prob:" + prob ) ) ; System . out . println ( ( "Exact<sp>samples<sp>:<sp>" + ( java . util . Arrays . toString ( obsBin ) ) ) ) ; System . out . println ( ( "SampleL<sp>samples:<sp>" + ( java . util . Arrays . toString ( obsBinomSampler ) ) ) ) ; System . out . println ( ( "Exact<sp>samples<sp>:<sp>" + ( java . util . Arrays . toString ( samplesB ) ) ) ) ; System . out . println ( ( "SampleL<sp>samples:<sp>" + ( java . util . Arrays . toString ( samplesBinomSampler ) ) ) ) ; System . err . println ( "TEST<sp>FAILS" ) ; } "<AssertPlaceHolder>" ; System . out . println ( ) ; } } } findSeqRange ( long [ ] ) { int maxSequenceStartIndex = 0 ; int maxSequenceLength = 0 ; int currentSequenceStartIndex = 0 ; int currentSequenceLength = 0 ; for ( int i = 0 ; i < ( array . length ) ; i ++ ) { if ( ( array [ i ] ) == 0 ) { if ( currentSequenceLength > maxSequenceLength ) { maxSequenceLength = currentSequenceLength ; maxSequenceStartIndex = currentSequenceStartIndex ; } currentSequenceStartIndex = i + 1 ; currentSequenceLength = 0 ; } else { currentSequenceLength ++ ; } } if ( currentSequenceLength > maxSequenceLength ) { maxSequenceStartIndex = currentSequenceStartIndex ; maxSequenceLength = currentSequenceLength ; } int maxSequenceEndIndex = maxSequenceStartIndex + maxSequenceLength ; return new int [ ] { maxSequenceStartIndex , maxSequenceEndIndex } ; } | org . junit . Assert . assertTrue ( ( test1 > 0.01 ) ) |
testIsSameMediaPackageTrue ( ) { java . net . URI mpURI = org . opencastproject . liveschedule . impl . LiveScheduleServiceImplTest . class . getResource ( "/assetmanager-mp.xml" ) . toURI ( ) ; org . opencastproject . mediapackage . MediaPackage mp = org . opencastproject . mediapackage . MediaPackageBuilderFactory . newInstance ( ) . newMediaPackageBuilder ( ) . loadFromXml ( mpURI . toURL ( ) . openStream ( ) ) ; setUpAssetManager ( mp ) ; replayServices ( ) ; org . opencastproject . mediapackage . MediaPackage mp1 = ( ( org . opencastproject . mediapackage . MediaPackage ) ( service . getSnapshot ( org . opencastproject . liveschedule . impl . LiveScheduleServiceImplTest . MP_ID ) . getMediaPackage ( ) . clone ( ) ) ) ; mp1 . setDuration ( org . opencastproject . liveschedule . impl . LiveScheduleServiceImplTest . DURATION ) ; service . addLiveTracks ( mp1 , org . opencastproject . liveschedule . impl . LiveScheduleServiceImplTest . CAPTURE_AGENT_NAME ) ; org . opencastproject . mediapackage . MediaPackage mp2 = ( ( org . opencastproject . mediapackage . MediaPackage ) ( service . getSnapshot ( org . opencastproject . liveschedule . impl . LiveScheduleServiceImplTest . MP_ID ) . getMediaPackage ( ) . clone ( ) ) ) ; mp2 . setDuration ( org . opencastproject . liveschedule . impl . LiveScheduleServiceImplTest . DURATION ) ; service . addLiveTracks ( mp2 , org . opencastproject . liveschedule . impl . LiveScheduleServiceImplTest . CAPTURE_AGENT_NAME ) ; "<AssertPlaceHolder>" ; } isSameMediaPackage ( org . opencastproject . mediapackage . MediaPackage , org . opencastproject . mediapackage . MediaPackage ) { return ( ( ( ( ( ( ( ( ( java . util . Objects . equals ( previous . getTitle ( ) , current . getTitle ( ) ) ) && ( java . util . Objects . equals ( previous . getLanguage ( ) , current . getLanguage ( ) ) ) ) && ( java . util . Objects . equals ( previous . getSeries ( ) , current . getSeries ( ) ) ) ) && ( java . util . Objects . equals ( previous . getSeriesTitle ( ) , current . getSeriesTitle ( ) ) ) ) && ( java . util . Objects . equals ( previous . getDuration ( ) , current . getDuration ( ) ) ) ) && ( java . util . Objects . equals ( previous . getDate ( ) , current . getDate ( ) ) ) ) && ( isSameArray ( previous . getCreators ( ) , current . getCreators ( ) ) ) ) && ( isSameArray ( previous . getContributors ( ) , current . getContributors ( ) ) ) ) && ( isSameArray ( previous . getSubjects ( ) , current . getSubjects ( ) ) ) ) && ( isSameTrackArray ( previous . getTracks ( ) , current . getTracks ( ) ) ) ; } | org . junit . Assert . assertTrue ( service . isSameMediaPackage ( mp1 , mp2 ) ) |
setDestination_LayoutNormal ( ) { org . eclipse . tycho . surefire . provisioning . ProvisionedInstallationBuilder builder = new org . eclipse . tycho . surefire . provisioning . ProvisionedInstallationBuilder ( null , null , null , null ) ; java . io . File work = tempDir . newFolder ( "work" ) ; builder . setDestination ( work ) ; "<AssertPlaceHolder>" ; } getEffectiveDestination ( ) { return effectiveDestination ; } | org . junit . Assert . assertEquals ( work , builder . getEffectiveDestination ( ) ) |
testVerificatieObjectSleutelMetPersoonBetrokkenheidZonderPersoon ( ) { nl . bzk . brp . model . bericht . kern . AdministratieveHandelingBericht administratieveHandeling = new nl . bzk . brp . model . bericht . kern . HandelingVerwijderingAfnemerindicatieBericht ( ) ; final nl . bzk . brp . model . bijhouding . BijhoudingsBericht bericht = maakBerichtMetBsnIdentificatieVoorAdministratieveHandeling ( administratieveHandeling ) ; nl . bzk . brp . model . bericht . kern . PersoonBericht persoonBericht = ( ( nl . bzk . brp . model . bericht . kern . PersoonBericht ) ( administratieveHandeling . getActies ( ) . get ( 0 ) . getRootObject ( ) ) ) ; persoonBericht . setIdentificerendeSleutel ( "identificerendeSleutel" ) ; persoonBericht . setObjectSleutel ( ( ( java . lang . String ) ( null ) ) ) ; persoonBericht . setObjectSleutel ( "persoonID" ) ; nl . bzk . brp . model . bericht . kern . BetrokkenheidBericht betrokkenheidBericht = new nl . bzk . brp . model . bericht . kern . PartnerBericht ( ) ; persoonBericht . setBetrokkenheden ( java . util . Arrays . asList ( betrokkenheidBericht ) ) ; when ( objectSleutelService . bepaalPersoonId ( "persoonID" , 1 ) ) . thenReturn ( 2 ) ; final nl . bzk . brp . bijhouding . business . stappen . resultaat . Resultaat resultaat = stap . voerStapUit ( bericht , berichtContext ) ; "<AssertPlaceHolder>" ; } getMeldingen ( ) { return java . util . Collections . unmodifiableSet ( meldingen ) ; } | org . junit . Assert . assertTrue ( resultaat . getMeldingen ( ) . isEmpty ( ) ) |
testIncNumberRequests ( ) { wsattacker . plugin . dos . dosExtension . logEntry . LogEntryInterval instance = new wsattacker . plugin . dos . dosExtension . logEntry . LogEntryInterval ( ) ; int expResult = ( instance . getNumberRequests ( ) ) + 1 ; instance . incNumberRequests ( ) ; int result = instance . getNumberRequests ( ) ; "<AssertPlaceHolder>" ; } getNumberRequests ( ) { return numberRequests ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testGetStaticLabel ( ) { System . out . println ( "getStaticLabel" ) ; kg . apc . jmeter . vizualizers . PerfMonGui instance = new kg . apc . jmeter . vizualizers . PerfMonGui ( ) ; java . lang . String result = instance . getStaticLabel ( ) ; "<AssertPlaceHolder>" ; } getStaticLabel ( ) { return kg . apc . jmeter . JMeterPluginsUtils . prefixLabel ( "Response<sp>Codes<sp>per<sp>Second" ) ; } | org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) ) |
testGetMTime ( ) { org . dcache . nfs . vfs . Stat stat = new org . dcache . nfs . vfs . Stat ( ) ; stat . setMTime ( 1 ) ; "<AssertPlaceHolder>" ; } getMTime ( ) { guard ( org . dcache . nfs . vfs . Stat . StatAttribute . MTIME ) ; return _mtime ; } | org . junit . Assert . assertEquals ( 1 , stat . getMTime ( ) ) |
testGetQueryGTFilters ( ) { filters . add ( org . nohope . cassandra . mapservice . cfilter . CFilters . gt ( org . nohope . cassandra . mapservice . Value . bound ( org . nohope . cassandra . mapservice . CFilterBuilderTest . INT_COL , 4 ) ) ) ; final java . util . List < org . nohope . cassandra . mapservice . cfilter . CFilter < ? > > builderFilters = org . nohope . cassandra . mapservice . CFilterBuilder . getQueryFilters ( ) . gt ( org . nohope . cassandra . mapservice . CFilterBuilderTest . INT_COL , 4 ) . getFilters ( ) ; "<AssertPlaceHolder>" ; } getFilters ( ) { return java . util . Collections . unmodifiableCollection ( filters ) ; } | org . junit . Assert . assertEquals ( filters , builderFilters ) |
testOk ( ) { final nl . moderniseringgba . isc . esb . message . sync . impl . DeblokkeringAntwoordBericht antwoord = new nl . moderniseringgba . isc . esb . message . sync . impl . DeblokkeringAntwoordBericht ( ) ; antwoord . setStatus ( StatusType . OK ) ; final java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parameters . put ( "deblokkerenAntwoordBericht" , antwoord ) ; final java . lang . String result = subject . execute ( parameters ) ; "<AssertPlaceHolder>" ; } execute ( java . util . Map ) { nl . bzk . migratiebrp . isc . jbpm . uc1003 . MaakZoekPersoonBerichtAction . LOG . debug ( "execute(parameters={})" , parameters ) ; final java . lang . Long berichtId = ( ( java . lang . Long ) ( parameters . get ( "input" ) ) ) ; final nl . bzk . migratiebrp . bericht . model . lo3 . Lo3Bericht input = ( ( nl . bzk . migratiebrp . bericht . model . lo3 . Lo3Bericht ) ( berichtenDao . leesBericht ( berichtId ) ) ) ; final nl . bzk . migratiebrp . bericht . model . sync . SyncBericht verzoek = maakZoekPersoonVerzoekBericht ( input ) ; final java . lang . Long verzoekId = berichtenDao . bewaarBericht ( verzoek ) ; final java . util . Map < java . lang . String , java . lang . Object > result = new java . util . HashMap ( ) ; result . put ( "zoekPersoonVerzoek" , verzoekId ) ; nl . bzk . migratiebrp . isc . jbpm . uc1003 . MaakZoekPersoonBerichtAction . LOG . debug ( "result:<sp>{}" , result ) ; return result ; } | org . junit . Assert . assertEquals ( null , result ) |
constructUnsignedPayload ( ) { com . google . cloud . storage . SignatureInfo . Builder builder = new com . google . cloud . storage . SignatureInfo . Builder ( HttpMethod . PUT , 0L , java . net . URI . create ( com . google . cloud . storage . SignatureInfoTest . RESOURCE ) ) ; java . lang . String unsignedPayload = builder . build ( ) . constructUnsignedPayload ( ) ; "<AssertPlaceHolder>" ; } constructUnsignedPayload ( ) { com . google . cloud . storage . SignatureInfo . Builder builder = new com . google . cloud . storage . SignatureInfo . Builder ( HttpMethod . PUT , 0L , java . net . URI . create ( com . google . cloud . storage . SignatureInfoTest . RESOURCE ) ) ; java . lang . String unsignedPayload = builder . build ( ) . constructUnsignedPayload ( ) ; org . junit . Assert . assertEquals ( ( "PUT\n\n\n0\n" + ( com . google . cloud . storage . SignatureInfoTest . RESOURCE ) ) , unsignedPayload ) ; } | org . junit . Assert . assertEquals ( ( "PUT\n\n\n0\n" + ( com . google . cloud . storage . SignatureInfoTest . RESOURCE ) ) , unsignedPayload ) |
testEvaluateTwoIndexCrossProduct1 ( ) { final java . lang . String indexSparqlString = "" + ( ( ( ( "SELECT<sp>?e<sp>?l<sp>?c<sp>" + "{" ) + "<sp>?e<sp>a<sp>?c<sp>.<sp>" ) + "<sp>?e<sp><http://www.w3.org/2000/01/rdf-schema#label><sp>?l<sp>" ) + "}" ) ; final java . lang . String indexSparqlString2 = "" + ( ( ( ( "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 0 + "{" ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 2 ) + "}" ) ; final java . lang . String queryString = "" + ( ( ( ( ( ( ( "SELECT<sp>?e<sp>?c<sp>?l<sp>?o<sp>?f<sp>?g<sp>" + "{" ) + "<sp>?e<sp>a<sp>?c<sp>.<sp>" ) + "<sp>?e<sp><http://www.w3.org/2000/01/rdf-schema#label><sp>?l<sp>.<sp>" ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 1 ) + "<sp>?f<sp><uri:talksTo><sp>?g<sp>.<sp>" ) + "}" ) ; final org . eclipse . rdf4j . query . parser . sparql . SPARQLParser sp = new org . eclipse . rdf4j . query . parser . sparql . SPARQLParser ( ) ; final org . eclipse . rdf4j . query . parser . ParsedQuery index1 = sp . parseQuery ( indexSparqlString , null ) ; final org . eclipse . rdf4j . query . parser . ParsedQuery index2 = sp . parseQuery ( indexSparqlString2 , null ) ; final java . util . List < org . apache . rya . indexing . external . tupleSet . ExternalTupleSet > index = com . google . common . collect . Lists . newArrayList ( ) ; final org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ais1 = new org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ( ( ( org . eclipse . rdf4j . query . algebra . Projection ) ( index1 . getTupleExpr ( ) ) ) ) ; final org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ais2 = new org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ( ( ( org . eclipse . rdf4j . query . algebra . Projection ) ( index2 . getTupleExpr ( ) ) ) ) ; index . add ( ais2 ) ; index . add ( ais1 ) ; final org . eclipse . rdf4j . query . parser . ParsedQuery pq = sp . parseQuery ( queryString , null ) ; final org . eclipse . rdf4j . query . algebra . TupleExpr tup = pq . getTupleExpr ( ) . clone ( ) ; provider . setIndices ( index ) ; final org . apache . rya . indexing . pcj . matching . PCJOptimizer pcj = new org . apache . rya . indexing . pcj . matching . PCJOptimizer ( index , false , provider ) ; pcj . optimize ( tup , null , null ) ; final org . apache . rya . indexing . IndexPlanValidator . IndexPlanValidator ipv = new org . apache . rya . indexing . IndexPlanValidator . IndexPlanValidator ( true ) ; "<AssertPlaceHolder>" ; } isValid ( org . eclipse . rdf4j . query . algebra . TupleExpr ) { org . apache . rya . indexing . IndexPlanValidator . IndexPlanValidator . TupleValidateVisitor tv = new org . apache . rya . indexing . IndexPlanValidator . IndexPlanValidator . TupleValidateVisitor ( ) ; te . visit ( tv ) ; return tv . isValid ( ) ; } | org . junit . Assert . assertEquals ( false , ipv . isValid ( tup ) ) |
testEmpty ( ) { java . util . List < java . lang . String > matches = consoleCommands . findMatches ( "" ) ; "<AssertPlaceHolder>" ; } size ( ) { return all . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , matches . size ( ) ) |
testConcurrentLogRequest ( ) { final java . util . concurrent . ConcurrentHashMap < java . lang . Integer , org . owasp . esapi . Logger > logCapture = new java . util . concurrent . ConcurrentHashMap ( ) ; java . util . List < java . lang . Thread > threads = new java . util . ArrayList ( ) ; final java . util . concurrent . CountDownLatch forceConcurrency = new java . util . concurrent . CountDownLatch ( 1 ) ; for ( int x = 0 ; x < 10 ; x ++ ) { final int requestIndex = x ; java . lang . Runnable requestLogByClass = new java . lang . Runnable ( ) { @ org . owasp . esapi . reference . Override public void run ( ) { try { forceConcurrency . await ( ) ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; } logCapture . put ( requestIndex , org . owasp . esapi . reference . JavaLogFactory . getInstance ( ) . getLogger ( org . owasp . esapi . reference . JavaLogFactoryTest . class ) ) ; } } ; java . lang . Runnable requestLogByModule = new java . lang . Runnable ( ) { @ org . owasp . esapi . reference . Override public void run ( ) { try { forceConcurrency . await ( ) ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; } logCapture . put ( requestIndex , org . owasp . esapi . reference . JavaLogFactory . getInstance ( ) . getLogger ( org . owasp . esapi . reference . JavaLogFactoryTest . class . getName ( ) ) ) ; } } ; threads . add ( new java . lang . Thread ( requestLogByClass , ( "Request<sp>Log<sp>By<sp>Class<sp>" + x ) ) ) ; threads . add ( new java . lang . Thread ( requestLogByModule , ( "Request<sp>Log<sp>By<sp>Name<sp>" + x ) ) ) ; } for ( java . lang . Thread thread : threads ) { thread . start ( ) ; } forceConcurrency . countDown ( ) ; for ( java . lang . Thread thread : threads ) { thread . join ( ) ; } java . util . Set < org . owasp . esapi . Logger > uniqueLoggers = new java . util . HashSet ( logCapture . values ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return errorList . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , uniqueLoggers . size ( ) ) |
getServerBaseUrlHttps_WithoutSlash ( ) { java . lang . String value = "https://thisisaurl" ; when ( mock . getVOConfigurationSetting ( eq ( ConfigurationKey . BASE_URL_HTTPS ) , anyString ( ) ) ) . thenReturn ( createSetting ( ConfigurationKey . BASE_URL_HTTPS , value ) ) ; "<AssertPlaceHolder>" ; } getServerBaseUrlHttps ( ) { if ( ( serverBaseUrlHttps ) == null ) { lookupConfigurationService ( ) ; org . oscm . internal . vo . VOConfigurationSetting setting = configurationService . getVOConfigurationSetting ( ConfigurationKey . BASE_URL_HTTPS , Configuration . GLOBAL_CONTEXT ) ; if ( setting != null ) { serverBaseUrlHttps = getTailoredUrl ( setting ) ; } } return serverBaseUrlHttps ; } | org . junit . Assert . assertEquals ( value , bean . getServerBaseUrlHttps ( ) ) |
testCompare ( ) { java . lang . String [ ] initialOrder = new java . lang . String [ ] { "a" , null , "bf" , "Ba" , "de" , "f" , "1" } ; java . lang . String [ ] expectedOrder = new java . lang . String [ ] { "1" , "a" , "Ba" , "bf" , "de" , "f" , null } ; com . google . gerrit . reviewdb . Project [ ] projects = org . eclipse . mylyn . internal . gerrit . core . client . ProjectByNameComparatorTest . fromNames ( initialOrder ) ; java . util . Arrays . sort ( projects , new org . eclipse . mylyn . internal . gerrit . core . client . ProjectByNameComparator ( ) ) ; "<AssertPlaceHolder>" ; } fromProjects ( com . google . gerrit . reviewdb . Project [ ] ) { java . lang . String [ ] names = new java . lang . String [ projects . length ] ; for ( int i = 0 ; i < ( projects . length ) ; i ++ ) { names [ i ] = projects [ i ] . getName ( ) ; } return names ; } | org . junit . Assert . assertArrayEquals ( expectedOrder , org . eclipse . mylyn . internal . gerrit . core . client . ProjectByNameComparatorTest . fromProjects ( projects ) ) |
runAClass ( ) { org . junit . tests . running . core . CommandLineTest . testWasRun = false ; org . junit . runner . JUnitCore . runClasses ( org . junit . tests . running . core . CommandLineTest . Example . class ) ; "<AssertPlaceHolder>" ; } runClasses ( java . lang . Class [ ] ) { return org . junit . runner . JUnitCore . runClasses ( org . junit . runner . JUnitCore . defaultComputer ( ) , classes ) ; } | org . junit . Assert . assertTrue ( org . junit . tests . running . core . CommandLineTest . testWasRun ) |
testHasMatchSimple ( ) { com . sap . core . odata . core . commons . ContentType m1 = com . sap . core . odata . core . commons . ContentType . create ( "aaa/bbb;x=z;a=b" ) ; com . sap . core . odata . core . commons . ContentType m2 = com . sap . core . odata . core . commons . ContentType . create ( "aaa/ccc" ) ; com . sap . core . odata . core . commons . ContentType m3 = com . sap . core . odata . core . commons . ContentType . create ( "foo/me" ) ; java . util . List < com . sap . core . odata . core . commons . ContentType > toMatchContentTypes = new java . util . ArrayList < com . sap . core . odata . core . commons . ContentType > ( ) ; toMatchContentTypes . add ( m1 ) ; toMatchContentTypes . add ( m2 ) ; toMatchContentTypes . add ( m3 ) ; com . sap . core . odata . core . commons . ContentType check = com . sap . core . odata . core . commons . ContentType . create ( "foo/me" ) ; boolean match = check . hasMatch ( toMatchContentTypes ) ; "<AssertPlaceHolder>" ; } hasMatch ( java . util . List ) { return ( match ( toMatchContentTypes ) ) != null ; } | org . junit . Assert . assertTrue ( match ) |
testCheckContentsArray ( ) { @ org . eclipse . jdt . annotation . Nullable java . lang . String [ ] array = new java . lang . @ org . eclipse . jdt . annotation . Nullable String [ 3 ] ; array [ 0 ] = "a" ; array [ 1 ] = "b" ; array [ 2 ] = "c" ; @ org . eclipse . jdt . annotation . NonNull java . lang . String [ ] out = org . eclipse . tracecompass . common . core . NonNullUtils . checkNotNullContents ( array ) ; "<AssertPlaceHolder>" ; } checkNotNullContents ( java . util . stream . Stream ) { if ( stream == null ) { throw new java . lang . NullPointerException ( ) ; } return org . eclipse . tracecompass . common . core . NonNullUtils . checkNotNull ( stream . < @ org . eclipse . jdt . annotation . NonNull T > map ( ( t ) -> checkNotNull ( t ) ) ) ; } | org . junit . Assert . assertArrayEquals ( array , out ) |
testSave ( ) { java . nio . file . Path tempFile = java . nio . file . Files . createTempFile ( "test" , "tmp" ) ; try { instance . save ( tempFile ) ; byte [ ] bytes = java . nio . file . Files . readAllBytes ( edu . illinois . library . cantaloupe . config . PropertiesDocumentTest . FIXTURE ) ; byte [ ] bytes2 = java . nio . file . Files . readAllBytes ( tempFile ) ; java . lang . String s1 = new java . lang . String ( bytes ) ; java . lang . String s2 = new java . lang . String ( bytes2 ) ; "<AssertPlaceHolder>" ; } finally { java . nio . file . Files . deleteIfExists ( tempFile ) ; } } save ( java . nio . file . Path ) { try ( java . io . BufferedWriter writer = java . nio . file . Files . newBufferedWriter ( file ) ) { for ( edu . illinois . library . cantaloupe . config . PropertiesDocument . Item item : items ) { writer . write ( item . toString ( ) ) ; writer . newLine ( ) ; } } } | org . junit . Assert . assertArrayEquals ( bytes , bytes2 ) |
testGetPropertyUtilsGetSymbolicName ( ) { System . out . println ( "getPropertyUtils<sp>SymbolicName" ) ; java . lang . String expResult = "PropertyUtils" ; java . lang . String result = OpenRate . utils . PropertyUtils . getPropertyUtils ( ) . getSymbolicName ( ) ; "<AssertPlaceHolder>" ; } getSymbolicName ( ) { return "OpenRateTest" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testEncoded ( ) { udt . packets . DataPacket p = new udt . packets . DataPacket ( ) ; p . setPacketSequenceNumber ( 1 ) ; byte [ ] data = "test" . getBytes ( ) ; p . setData ( data ) ; byte [ ] encoded = p . getEncoded ( ) ; byte [ ] encData = new byte [ data . length ] ; java . lang . System . arraycopy ( encoded , 16 , encData , 0 , data . length ) ; java . lang . String s = new java . lang . String ( encData ) ; "<AssertPlaceHolder>" ; System . out . println ( ( "String<sp>s<sp>=<sp>" + s ) ) ; } getEncoded ( ) { byte [ ] result = new byte [ 16 + ( dataLength ) ] ; java . lang . System . arraycopy ( udt . packets . PacketUtil . encode ( packetSequenceNumber ) , 0 , result , 0 , 4 ) ; java . lang . System . arraycopy ( udt . packets . PacketUtil . encode ( messageNumber ) , 0 , result , 4 , 4 ) ; java . lang . System . arraycopy ( udt . packets . PacketUtil . encode ( timeStamp ) , 0 , result , 8 , 4 ) ; java . lang . System . arraycopy ( udt . packets . PacketUtil . encode ( destinationID ) , 0 , result , 12 , 4 ) ; java . lang . System . arraycopy ( data , 0 , result , 16 , dataLength ) ; return result ; } | org . junit . Assert . assertEquals ( "test" , s ) |
connectRepositoryProxyInfo ( ) { this . wagon . connect ( this . repository , this . proxyInfo ) ; "<AssertPlaceHolder>" ; verify ( this . sessionListenerSupport ) . fireSessionOpening ( ) ; verify ( this . wagon ) . connectToRepository ( eq ( this . repository ) , ( ( org . apache . maven . wagon . authentication . AuthenticationInfo ) ( isNull ( ) ) ) , any ( org . springframework . build . aws . maven . NullProtectingProxyInfoProvider . class ) ) ; verify ( this . sessionListenerSupport ) . fireSessionLoggedIn ( ) ; verify ( this . sessionListenerSupport ) . fireSessionOpened ( ) ; } getRepository ( ) { return this . repository ; } | org . junit . Assert . assertEquals ( this . repository , this . wagon . getRepository ( ) ) |
testCancelNullPermitted ( ) { schedule . cancel ( null ) ; "<AssertPlaceHolder>" ; } cancel ( ru . r2cloud . model . Satellite ) { schedule . cancel ( satelliteToEdit . getId ( ) ) ; } | org . junit . Assert . assertTrue ( true ) |
testLargerSampleExecution ( ) { java . util . stream . Stream < java . lang . Integer > inputStream = java . util . stream . Stream . of ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ) ; org . qcri . rheem . java . operators . JavaRandomSampleOperator < java . lang . Integer > sampleOperator = new org . qcri . rheem . java . operators . JavaRandomSampleOperator ( ( iterationNumber ) -> 15 , org . qcri . rheem . core . types . DataSetType . createDefaultUnchecked ( org . qcri . rheem . java . operators . Integer . class ) , ( iteration ) -> 42L ) ; sampleOperator . setDatasetSize ( 10 ) ; org . qcri . rheem . java . channels . JavaChannelInstance [ ] inputs = new org . qcri . rheem . java . channels . JavaChannelInstance [ ] { createStreamChannelInstance ( inputStream ) } ; org . qcri . rheem . java . channels . JavaChannelInstance [ ] outputs = new org . qcri . rheem . java . channels . JavaChannelInstance [ ] { createStreamChannelInstance ( ) } ; evaluate ( sampleOperator , inputs , outputs ) ; final java . util . List < java . lang . Integer > result = outputs [ 0 ] . < java . lang . Integer > provideStream ( ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . entries . size ( ) ; } | org . junit . Assert . assertEquals ( 10 , result . size ( ) ) |
testUpdateNoContainerFields ( ) { org . springframework . data . mongodb . core . query . Query query = org . mockito . Mockito . mock ( org . springframework . data . mongodb . core . query . Query . class ) ; com . mongodb . DBObject queryObject = org . mockito . Mockito . mock ( com . mongodb . DBObject . class ) ; org . slc . sli . dal . convert . Map < java . lang . String , java . lang . Object > body = new org . slc . sli . dal . convert . HashMap < java . lang . String , java . lang . Object > ( ) ; body . put ( "studentId" , "student1" ) ; body . put ( "schoolId" , "school1" ) ; body . put ( "schoolYear" , "schoolyear1" ) ; org . slc . sli . dal . convert . Map < java . lang . String , java . lang . Object > fields = new org . slc . sli . dal . convert . HashMap < java . lang . String , java . lang . Object > ( ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : body . entrySet ( ) ) { fields . put ( ( "body." + ( entry . getKey ( ) ) ) , entry . getValue ( ) ) ; } com . mongodb . DBObject docsToPersist = new com . mongodb . BasicDBObject ( "$set" , new com . mongodb . BasicDBObject ( fields ) ) ; when ( query . getQueryObject ( ) ) . thenReturn ( queryObject ) ; when ( mongoTemplate . getCollection ( org . slc . sli . dal . convert . ContainerDocumentAccessorTest . ATTENDANCE ) ) . thenReturn ( mockCollection ) ; when ( mockCollection . update ( org . mockito . Mockito . eq ( queryObject ) , org . mockito . Mockito . eq ( docsToPersist ) , org . mockito . Mockito . eq ( true ) , org . mockito . Mockito . eq ( false ) , org . mockito . Mockito . eq ( WriteConcern . SAFE ) ) ) . thenReturn ( writeResult ) ; boolean result = testAccessor . updateContainerDoc ( query , body , org . slc . sli . dal . convert . ContainerDocumentAccessorTest . ATTENDANCE , org . slc . sli . dal . convert . ContainerDocumentAccessorTest . ATTENDANCE ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( mockCollection , org . mockito . Mockito . times ( 1 ) ) . update ( org . mockito . Mockito . eq ( queryObject ) , org . mockito . Mockito . eq ( docsToPersist ) , org . mockito . Mockito . eq ( true ) , org . mockito . Mockito . eq ( false ) , org . mockito . Mockito . eq ( WriteConcern . SAFE ) ) ; } updateContainerDoc ( org . springframework . data . mongodb . core . query . Query , java . util . Map , java . lang . String , java . lang . String ) { final org . slc . sli . common . domain . ContainerDocument containerDocument = containerDocumentHolder . getContainerDocument ( type ) ; if ( containerDocument . isContainerSubdoc ( ) ) { org . springframework . data . mongodb . core . query . Update update = new org . springframework . data . mongodb . core . query . Update ( ) ; for ( Map . Entry < java . lang . String , java . lang . Object > patch : newValues . entrySet ( ) ) { update . set ( ( "body." + ( patch . getKey ( ) ) ) , patch . getValue ( ) ) ; } return getLocation ( type ) . doUpdate ( query , update ) ; } org . slc . sli . dal . convert . DBObject emptyArray = new org . slc . sli . dal . convert . BasicDBObject ( ) ; emptyArray . put ( ( "body." + ( containerDocument . getFieldToPersist ( ) ) ) , new java . util . ArrayList ( ) ) ; org . slc . sli . dal . convert . DBObject setEmptyArray = new org . slc . sli . dal . convert . BasicDBObject ( "$set" , emptyArray ) ; mongoTemplate . getCollection ( collectionName ) . update ( query . getQueryObject ( ) , setEmptyArray , false , false , WriteConcern . SAFE ) ; org . slc . sli . common . util . tenantdb . TenantContext . setIsSystemCall ( false ) ; final java . lang . String fieldToPersist = containerDocument . getFieldToPersist ( ) ; org . slc . sli . dal . convert . DBObject entityDetails = new org . slc . sli . dal . convert . BasicDBObject ( ) ; for ( Map . Entry < java . lang . String , java . lang . Object > newValue : newValues . entrySet ( ) ) { if ( ! ( newValue . getKey ( ) . equals ( containerDocument . getFieldToPersist ( ) ) ) ) { entityDetails . put ( ( "body." + ( newValue . getKey ( ) ) ) , newValue . getValue ( ) ) ; } } org . slc . sli . dal . convert . DBObject set = new org . slc . sli . dal . convert . BasicDBObject ( "$set" , entityDetails ) ; org . slc . sli . dal . convert . DBObject docToPersist = null ; if ( newValues . containsKey ( containerDocument . getFieldToPersist ( ) ) ) { docToPersist = org . slc . sli . dal . convert . BasicDBObjectBuilder . start ( | org . junit . Assert . assertTrue ( result ) |
loadStoredSettingsShouldSetSystemColorWhenSet ( ) { net . usikkert . kouchat . android . util . RobolectricTestUtils . setSystemColorInTheAndroidSettingsTo ( 54321 ) ; settingsLoader . loadStoredSettings ( context , settings ) ; "<AssertPlaceHolder>" ; } getSysColor ( ) { return sysColor ; } | org . junit . Assert . assertEquals ( 54321 , settings . getSysColor ( ) ) |
stopsTakingAfterFirstPredicateFailure ( ) { java . lang . Iterable < java . lang . String > words = asList ( "once" , "upon" , "a" , "time" ) ; com . jnape . palatable . lambda . iteration . PredicatedTakingIterator < java . lang . String > predicatedTakingIterator = new com . jnape . palatable . lambda . iteration . PredicatedTakingIterator ( com . jnape . palatable . lambda . iteration . PredicatedTakingIteratorTest . HAS_FOUR_LETTERS , words . iterator ( ) ) ; predicatedTakingIterator . next ( ) ; predicatedTakingIterator . next ( ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return iterator . hasNext ( ) ; } | org . junit . Assert . assertThat ( predicatedTakingIterator . hasNext ( ) , org . hamcrest . core . Is . is ( false ) ) |
testLdapBindingAmbiguousUserName ( ) { org . eclipse . jetty . server . UserIdentity userIdentity = doLogin ( "ambiguousone" , "foobar" ) ; "<AssertPlaceHolder>" ; } doLogin ( java . lang . String , java . lang . String ) { org . eclipse . jetty . jaas . JAASLoginService ls = jaasLoginService ( "foo" ) ; org . eclipse . jetty . server . Request request = new org . eclipse . jetty . server . Request ( null , null ) ; return ls . login ( username , password , request ) ; } | org . junit . Assert . assertNull ( userIdentity ) |
testConcatByteArraysByteArrays_EnsureArrayConcatination ( ) { byte [ ] array1 = new byte [ ] { ( ( byte ) ( 1 ) ) } ; byte [ ] array2 = new byte [ ] { ( ( byte ) ( 2 ) ) } ; byte [ ] array3 = new byte [ ] { ( ( byte ) ( 128 ) ) } ; byte [ ] expected = new byte [ ] { ( ( byte ) ( 1 ) ) , ( ( byte ) ( 2 ) ) , ( ( byte ) ( 128 ) ) } ; byte [ ] result = de . persosim . simulator . utils . Utils . concatByteArrays ( array1 , array2 , array3 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertArrayEquals ( expected , result ) |
testReverseEvenLengthArray ( ) { java . lang . Integer [ ] input = new java . lang . Integer [ ] { 1 , 2 } ; java . lang . Integer [ ] expected = new java . lang . Integer [ ] { 2 , 1 } ; com . killeent . Array . Array . reverse ( input , 0 , ( ( input . length ) - 1 ) ) ; "<AssertPlaceHolder>" ; } reverse ( T [ ] , int , int ) { if ( arr == null ) { throw new java . lang . IllegalArgumentException ( "arr<sp>is<sp>null" ) ; } if ( hi < lo ) { throw new java . lang . IllegalArgumentException ( "hi<sp><<sp>lo" ) ; } while ( lo < hi ) { com . killeent . Array . Array . swap ( arr , lo , hi ) ; lo ++ ; hi -- ; } } | org . junit . Assert . assertEquals ( expected , input ) |
testConstructor ( ) { org . openhealthtools . mdht . uml . cda . cdt . operations . DiagnosticFindingsOperations obj = new org . openhealthtools . mdht . uml . cda . cdt . operations . DiagnosticFindingsOperations ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
links ( ) { org . jvnet . hudson . test . JenkinsRule . WebClient wc = j . createWebClient ( ) ; for ( int i = 0 ; ; i ++ ) { com . gargoylesoftware . htmlunit . html . HtmlPage page = wc . goTo ( "manage" ) ; java . util . List < ? > anchors = com . gargoylesoftware . htmlunit . html . DomNodeUtil . selectNodes ( page , "//div[@class='manage-option']/a[not(@onclick)]" ) ; "<AssertPlaceHolder>" ; if ( i == ( anchors . size ( ) ) ) return ; ( ( com . gargoylesoftware . htmlunit . html . HtmlAnchor ) ( anchors . get ( i ) ) ) . click ( ) ; } } size ( ) { return ( queueItems . size ( ) ) + ( runs . size ( ) ) ; } | org . junit . Assert . assertTrue ( ( ( anchors . size ( ) ) >= 8 ) ) |
testClear ( ) { cern . entwined . TransactionalQueue < java . lang . Integer > queue = new cern . entwined . TransactionalQueue < java . lang . Integer > ( newList ( 1 , 2 , 3 ) ) ; queue . clear ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return null == ( peek ( ) ) ; } | org . junit . Assert . assertTrue ( queue . isEmpty ( ) ) |
roundTrip ( ) { java . util . List < org . geolatte . geom . Geometry > geometries = getGeometries ( ) ; for ( org . geolatte . geom . Geometry geometry : geometries ) { org . postgis . Geometry converted = com . querydsl . sql . spatial . PGgeometryConverter . convert ( geometry ) ; org . geolatte . geom . Geometry back = com . querydsl . sql . spatial . PGgeometryConverter . convert ( converted ) ; "<AssertPlaceHolder>" ; } } convert ( com . querydsl . sql . spatial . Geometry ) { if ( geometry instanceof com . querydsl . sql . spatial . Point ) { return com . querydsl . sql . spatial . PGgeometryConverter . convert ( ( ( com . querydsl . sql . spatial . Point ) ( geometry ) ) ) ; } else if ( geometry instanceof com . querydsl . sql . spatial . LinearRing ) { return com . querydsl . sql . spatial . PGgeometryConverter . convert ( ( ( com . querydsl . sql . spatial . LinearRing ) ( geometry ) ) ) ; } else if ( geometry instanceof com . querydsl . sql . spatial . LineString ) { return com . querydsl . sql . spatial . PGgeometryConverter . convert ( ( ( com . querydsl . sql . spatial . LineString ) ( geometry ) ) ) ; } else if ( geometry instanceof com . querydsl . sql . spatial . MultiLineString ) { return com . querydsl . sql . spatial . PGgeometryConverter . convert ( ( ( com . querydsl . sql . spatial . MultiLineString ) ( geometry ) ) ) ; } else if ( geometry instanceof com . querydsl . sql . spatial . Polygon ) { return com . querydsl . sql . spatial . PGgeometryConverter . convert ( ( ( com . querydsl . sql . spatial . Polygon ) ( geometry ) ) ) ; } else if ( geometry instanceof com . querydsl . sql . spatial . PolyHedralSurface ) { return com . querydsl . sql . spatial . PGgeometryConverter . convert ( ( ( com . querydsl . sql . spatial . PolyHedralSurface ) ( geometry ) ) ) ; } else if ( geometry instanceof com . querydsl . sql . spatial . MultiPoint ) { return com . querydsl . sql . spatial . PGgeometryConverter . convert ( ( ( com . querydsl . sql . spatial . MultiPoint ) ( geometry ) ) ) ; } else if ( geometry instanceof com . querydsl . sql . spatial . MultiPolygon ) { return com . querydsl . sql . spatial . PGgeometryConverter . convert ( ( ( com . querydsl . sql . spatial . MultiPolygon ) ( geometry ) ) ) ; } else if ( geometry instanceof com . querydsl . sql . spatial . GeometryCollection ) { return com . querydsl . sql . spatial . PGgeometryConverter . convert ( ( ( com . querydsl . sql . spatial . GeometryCollection ) ( geometry ) ) ) ; } else { throw new java . lang . IllegalArgumentException ( geometry . getClass ( ) . getName ( ) ) ; } } | org . junit . Assert . assertEquals ( geometry , back ) |
testReverseSingleElementArray ( ) { java . lang . Integer [ ] input = new java . lang . Integer [ ] { 1 } ; java . lang . Integer [ ] expected = new java . lang . Integer [ ] { 1 } ; com . killeent . Array . Array . reverse ( input , 0 , ( ( input . length ) - 1 ) ) ; "<AssertPlaceHolder>" ; } reverse ( T [ ] , int , int ) { if ( arr == null ) { throw new java . lang . IllegalArgumentException ( "arr<sp>is<sp>null" ) ; } if ( hi < lo ) { throw new java . lang . IllegalArgumentException ( "hi<sp><<sp>lo" ) ; } while ( lo < hi ) { com . killeent . Array . Array . swap ( arr , lo , hi ) ; lo ++ ; hi -- ; } } | org . junit . Assert . assertEquals ( expected , input ) |
testLfwReader ( ) { java . lang . String subDir = "lfw-a/lfw" ; java . io . File path = new java . io . File ( org . apache . commons . io . FilenameUtils . concat ( java . lang . System . getProperty ( "user.home" ) , subDir ) ) ; org . datavec . api . split . FileSplit fileSplit = new org . datavec . api . split . FileSplit ( path , LFWLoader . ALLOWED_FORMATS , new java . util . Random ( 42 ) ) ; org . datavec . api . io . filters . BalancedPathFilter pathFilter = new org . datavec . api . io . filters . BalancedPathFilter ( new java . util . Random ( 42 ) , LFWLoader . LABEL_PATTERN , 1 , 1 , 1 ) ; org . datavec . api . split . InputSplit [ ] inputSplit = fileSplit . sample ( pathFilter , 1 ) ; org . datavec . api . records . reader . RecordReader rr = new org . datavec . image . recordreader . ImageRecordReader ( 250 , 250 , 3 , LFWLoader . LABEL_PATTERN ) ; rr . initialize ( inputSplit [ 0 ] ) ; java . util . List < java . lang . String > exptedLabel = rr . getLabels ( ) ; org . datavec . api . records . reader . RecordReader rr2 = new org . datavec . image . loader . LFWLoader ( new int [ ] { 250 , 250 , 3 } , true ) . getRecordReader ( 1 , 1 , 1 , new java . util . Random ( 42 ) ) ; "<AssertPlaceHolder>" ; } get ( int ) { org . datavec . arrow . recordreader . ArrowWritableRecordBatch ret = new org . datavec . arrow . recordreader . ArrowWritableRecordBatch ( list , schema , i , ( ( timeSeriesStride ) / ( schema . numColumns ( ) ) ) ) ; return ret ; } | org . junit . Assert . assertEquals ( exptedLabel . get ( 0 ) , rr2 . getLabels ( ) . get ( 0 ) ) |
shouldAbortAcceptNoConnectionsOK ( ) { java . lang . String script = "accept<sp>\'tcp://localhost:8080\'\n" + ( ( ( "accepted\n" + "connected\n" ) + "close\n" ) + "closed\n" ) ; java . lang . String expected = "accept<sp>\'tcp://localhost:8080\'\n" + "\n" ; robot . prepareAndStart ( script ) . await ( ) ; robot . abort ( ) . await ( ) ; java . lang . String observedScript = robot . getObservedScript ( ) ; "<AssertPlaceHolder>" ; } getObservedScript ( ) { return ( progress ) != null ? progress . getObservedScript ( ) : null ; } | org . junit . Assert . assertEquals ( expected , observedScript ) |
intValidationShouldWork ( ) { when ( context . getParameter ( "param1" ) ) . thenReturn ( "blah" ) ; create ( "intParam" ) . invoke ( mockController , context ) ; verify ( mockController ) . intParam ( 0 ) ; "<AssertPlaceHolder>" ; } hasViolation ( java . lang . String ) { return this . violations . containsKey ( paramName ) ; } | org . junit . Assert . assertTrue ( validation . hasViolation ( "param1" ) ) |
testSetMinutes ( ) { org . opengis . util . InternationalString result = periodDuration1 . getMinutes ( ) ; ( ( org . geotoolkit . temporal . object . DefaultPeriodDuration ) ( periodDuration1 ) ) . setMinutes ( new org . apache . sis . util . iso . SimpleInternationalString ( "4" ) ) ; "<AssertPlaceHolder>" ; } getMinutes ( ) { return minutes ; } | org . junit . Assert . assertFalse ( periodDuration1 . getMinutes ( ) . equals ( result ) ) |
shouldUseProvidedChallengeMessage ( ) { edu . stanford . bmir . protege . web . shared . auth . ChapSession session = factory . create ( salt ) ; "<AssertPlaceHolder>" ; } getChallengeMessage ( ) { return challengeMessage ; } | org . junit . Assert . assertThat ( session . getChallengeMessage ( ) , org . hamcrest . core . Is . is ( challengeMessage ) ) |
testSpaceSettings ( ) { logTestStart ( ) ; java . io . File basedir = getBasedirForBuild ( ) ; org . apache . maven . shared . invoker . Invoker invoker = newInvoker ( ) ; org . apache . maven . shared . invoker . InvocationRequest request = new org . apache . maven . shared . invoker . DefaultInvocationRequest ( ) ; request . setBaseDirectory ( basedir ) ; request . setUserSettingsFile ( new java . io . File ( basedir , "settings<sp>with<sp>spaces.xml" ) ) ; request . setDebug ( true ) ; request . setGoals ( java . util . Arrays . asList ( "validate" ) ) ; org . apache . maven . shared . invoker . InvocationResult result = invoker . execute ( request ) ; "<AssertPlaceHolder>" ; } getExitCode ( ) { return exitCode ; } | org . junit . Assert . assertEquals ( 0 , result . getExitCode ( ) ) |
testGetAvailablePaymentTypes_AsSupplierEmptyList ( ) { container . login ( java . lang . String . valueOf ( supplier1User . getKey ( ) ) , org . oscm . accountservice . bean . ROLE_SERVICE_MANAGER ) ; java . util . Set < org . oscm . internal . vo . VOPaymentType > set = accountMgmt . getAvailablePaymentTypesForOrganization ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return false ; } | org . junit . Assert . assertTrue ( set . isEmpty ( ) ) |
testNonRecoverableProducersAreNotRegistered ( ) { final bitronix . tm . resource . common . XAResourceProducer producer = createMockProducer ( "non-recoverable" ) ; when ( producer . startRecovery ( ) ) . thenThrow ( new bitronix . tm . recovery . RecoveryException ( "recovery<sp>not<sp>possible" ) ) ; try { bitronix . tm . resource . ResourceRegistrar . register ( producer ) ; org . junit . Assert . fail ( "expecting<sp>RecoveryException" ) ; } catch ( bitronix . tm . recovery . RecoveryException e ) { "<AssertPlaceHolder>" ; } } get ( java . lang . String ) { if ( uniqueName != null ) { for ( bitronix . tm . resource . ResourceRegistrar . ProducerHolder holder : bitronix . tm . resource . ResourceRegistrar . resources ) { if ( ! ( holder . isInitialized ( ) ) ) continue ; if ( uniqueName . equals ( holder . getUniqueName ( ) ) ) return holder . producer ; } } return null ; } | org . junit . Assert . assertNull ( bitronix . tm . resource . ResourceRegistrar . get ( "non-recoverable" ) ) |
validateMandatoryAndNotEmpty ( ) { mandatorySubject . setValue ( nl . bzk . migratiebrp . voisc . spd . EXPIRED ) ; "<AssertPlaceHolder>" ; } validate ( ) { if ( ( isMandatory ( ) ) && ( isEmpty ( ) ) ) { throw new java . lang . IllegalStateException ( java . lang . String . format ( "field<sp>%s<sp>is<sp>mandatory<sp>and<sp>empty" , name ( ) ) ) ; } return true ; } | org . junit . Assert . assertEquals ( true , mandatorySubject . validate ( ) ) |
duplicatedStreamMetadataShouldBeEqual ( ) { com . github . msemys . esjc . StreamMetadata streamMetadata = com . github . msemys . esjc . StreamMetadata . newBuilder ( ) . maxCount ( 19L ) . maxAge ( java . time . Duration . ofSeconds ( 82 ) ) . truncateBefore ( 8L ) . cacheControl ( java . time . Duration . ofSeconds ( 17 ) ) . aclReadRoles ( asList ( "customBoolean" 8 , "b" 0 , "customBoolean" 2 , "b" 8 ) ) . aclWriteRoles ( asList ( "customBoolean" 1 ) ) . aclDeleteRoles ( asList ( "customEmptyStringArray" 0 ) ) . aclMetaReadRoles ( asList ( "customBoolean" 3 , "mackey" ) ) . aclMetaWriteRoles ( asList ( "customEmptyStringArray" 3 ) ) . customProperty ( "customBoolean" 6 , "customBoolean" 4 ) . customProperty ( "b" 1 , ( - 179 ) ) . customProperty ( "customDouble" , 1.7 ) . customProperty ( "customLong" , 123123123123123123L ) . customProperty ( "customBoolean" , true ) . customProperty ( "b" 6 , "b" 7 , "b" , "customBoolean" 5 , null ) . customProperty ( "customEmptyStringArray" 1 , 1 , 2 , 3 , null ) . customProperty ( "customBoolean" 7 , 111111111111111111L , 222222222222222222L , 333333333333333333L , null ) . customProperty ( "b" 2 , 1.2 , 3.4 , 5.6 , null ) . customProperty ( "b" 9 , true , null , false , null ) . customProperty ( "customEmptyStringArray" , new java . lang . String [ 0 ] ) . customProperty ( "b" 3 , new java . lang . Integer [ 0 ] ) . customProperty ( "customBoolean" 9 , new java . lang . Long [ 0 ] ) . customProperty ( "customEmptyStringArray" 2 , new java . lang . Double [ 0 ] ) . customProperty ( "customEmptyBooleanArray" , new java . lang . Boolean [ 0 ] ) . customProperty ( "b" 4 , ( ( java . lang . String ) ( null ) ) , null ) . customProperty ( "b" 5 , ( ( java . lang . Integer ) ( null ) ) , null ) . customProperty ( "customNullLongArray" , ( ( java . lang . Long ) ( null ) ) , null ) . customProperty ( "customBoolean" 0 , ( ( java . lang . Double ) ( null ) ) , null ) . customProperty ( "customNullBooleanArray" , ( ( java . lang . Boolean ) ( null ) ) , null ) . customProperty ( "customNullable" , ( ( java . lang . String ) ( null ) ) ) . build ( ) ; com . github . msemys . esjc . StreamMetadata result = streamMetadata . toBuilder ( ) . build ( ) ; "<AssertPlaceHolder>" ; } toJson ( ) { return com . github . msemys . esjc . SystemSettings . gson . toJson ( this ) ; } | org . junit . Assert . assertEquals ( streamMetadata . toJson ( ) , result . toJson ( ) ) |
testExpressionWithoutNewLines ( ) { org . jumpmind . symmetric . route . LookupTableDataRouter router = new org . jumpmind . symmetric . route . LookupTableDataRouter ( ) ; boolean valid = true ; try { router . parse ( ( "LOOKUP_TABLE=STORE<sp>KEY_COLUMN=BRAND_ID<sp>" + "LOOKUP_KEY_COLUMN=BRAND_ID<sp>EXTERNAL_ID_COLUMN=STORE_ID" ) ) ; } catch ( org . jumpmind . symmetric . SyntaxParsingException ex ) { valid = false ; } "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { s = s . trim ( ) ; if ( ( ( type ) == 'N' ) || ( ( type ) == 'F' ) ) { if ( s . equals ( "" ) ) { s = "0" ; } try { if ( ( getDecimalCount ( ) ) == 0 ) { return new java . lang . Long ( s ) ; } else { return new java . lang . Double ( s ) ; } } catch ( java . lang . NumberFormatException numberformatexception ) { throw new org . jumpmind . symmetric . route . parse . DBFException ( numberformatexception ) ; } } if ( ( type ) == 'C' ) { return s ; } if ( ( type ) == 'L' ) { if ( ( ( ( s . equals ( "Y" ) ) || ( s . equals ( "y" ) ) ) || ( s . equals ( "T" ) ) ) || ( s . equals ( "t" ) ) ) { return new java . lang . Boolean ( true ) ; } if ( ( ( ( s . equals ( "N" ) ) || ( s . equals ( "n" ) ) ) || ( s . equals ( "T" 0 ) ) ) || ( s . equals ( "T" 2 ) ) ) { return new java . lang . Boolean ( false ) ; } else { throw new org . jumpmind . symmetric . route . parse . DBFException ( ( "Unrecognized<sp>value<sp>for<sp>logical<sp>field:<sp>" + s ) ) ; } } if ( ( type ) == 'D' ) { org . jumpmind . symmetric . route . parse . SimpleDateFormat simpledateformat = new org . jumpmind . symmetric . route . parse . SimpleDateFormat ( "T" 1 ) ; try { if ( "" . equals ( s ) ) { return null ; } else { return simpledateformat . parse ( s ) ; } } catch ( org . jumpmind . symmetric . route . parse . ParseException parseexception ) { throw new org . jumpmind . symmetric . route . parse . DBFException ( parseexception ) ; } } else { throw new org . jumpmind . symmetric . route . parse . DBFException ( ( "Unrecognized<sp>DBFField<sp>type:<sp>" + ( type ) ) ) ; } } | org . junit . Assert . assertEquals ( true , valid ) |
findConfigFile ( ) { final java . io . File configFile = com . cloud . utils . PropertiesUtil . findConfigFile ( "notexistingresource" ) ; "<AssertPlaceHolder>" ; } findConfigFile ( java . lang . String ) { final java . lang . ClassLoader cl = com . cloud . utils . PropertiesUtil . class . getClassLoader ( ) ; java . net . URL url = cl . getResource ( path ) ; if ( ( url != null ) && ( "file" . equals ( url . getProtocol ( ) ) ) ) { return new java . io . File ( url . getFile ( ) ) ; } url = java . lang . ClassLoader . getSystemResource ( path ) ; if ( ( url != null ) && ( "file" . equals ( url . getProtocol ( ) ) ) ) { return new java . io . File ( url . getFile ( ) ) ; } java . io . File file = new java . io . File ( path ) ; if ( file . exists ( ) ) { return file ; } java . lang . String newPath = ( "conf" + ( path . startsWith ( File . separator ) ? "" : "/" ) ) + path ; url = java . lang . ClassLoader . getSystemResource ( newPath ) ; if ( ( url != null ) && ( "file" . equals ( url . getProtocol ( ) ) ) ) { return new java . io . File ( url . getFile ( ) ) ; } url = cl . getResource ( newPath ) ; if ( ( url != null ) && ( "file" . equals ( url . getProtocol ( ) ) ) ) { return new java . io . File ( url . getFile ( ) ) ; } newPath = ( "conf" + ( path . startsWith ( File . separator ) ? "" : java . io . File . separator ) ) + path ; file = new java . io . File ( newPath ) ; if ( file . exists ( ) ) { return file ; } newPath = java . lang . System . getProperty ( "catalina.home" ) ; if ( newPath == null ) { newPath = java . lang . System . getenv ( "CATALINA_HOME" ) ; } if ( newPath == null ) { newPath = java . lang . System . getenv ( "CATALINA_BASE" ) ; } if ( newPath == null ) { return null ; } file = new java . io . File ( ( ( ( ( newPath + ( java . io . File . separator ) ) + "conf" ) + ( java . io . File . separator ) ) + path ) ) ; if ( file . exists ( ) ) { return file ; } return null ; } | org . junit . Assert . assertNull ( configFile ) |
testBasicMap ( ) { java . util . Map < java . lang . Object , java . lang . Object > map = makeBasicMap ( ) ; java . lang . Object key = "key" ; java . lang . Object value = java . lang . Integer . valueOf ( 3 ) ; map . put ( key , value ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { return onget . evaluate ( map , ( ( K ) ( key ) ) ) ; } | org . junit . Assert . assertEquals ( value , map . get ( key ) ) |
testMetricsLogOutput ( ) { org . apache . hadoop . hdfs . server . datanode . TestDataNodeMetricsLogger . TestFakeMetric metricsProvider = new org . apache . hadoop . hdfs . server . datanode . TestDataNodeMetricsLogger . TestFakeMetric ( ) ; org . apache . hadoop . metrics2 . util . MBeans . register ( this . getClass ( ) . getSimpleName ( ) , "DummyMetrics" , metricsProvider ) ; startDNForTest ( true ) ; "<AssertPlaceHolder>" ; final org . apache . hadoop . hdfs . server . datanode . TestDataNodeMetricsLogger . PatternMatchingAppender appender = new org . apache . hadoop . hdfs . server . datanode . TestDataNodeMetricsLogger . PatternMatchingAppender ( "^.*FakeMetric.*$" ) ; addAppender ( DataNode . METRICS_LOG , appender ) ; org . apache . hadoop . test . GenericTestUtils . waitFor ( new com . google . common . base . Supplier < java . lang . Boolean > ( ) { @ org . apache . hadoop . hdfs . server . datanode . Override public org . apache . hadoop . hdfs . server . datanode . Boolean get ( ) { return appender . isMatched ( ) ; } } , 1000 , 60000 ) ; dn . shutdown ( ) ; } startDNForTest ( boolean ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; conf . set ( DFSConfigKeys . DFS_DATANODE_DATA_DIR_KEY , org . apache . hadoop . hdfs . server . datanode . TestDataNodeMetricsLogger . DATA_DIR ) ; conf . set ( DFSConfigKeys . DFS_DATANODE_ADDRESS_KEY , "0.0.0.0:0" ) ; conf . set ( DFSConfigKeys . DFS_DATANODE_HTTP_ADDRESS_KEY , "0.0.0.0:0" ) ; conf . set ( DFSConfigKeys . DFS_DATANODE_IPC_ADDRESS_KEY , "0.0.0.0:0" ) ; conf . setInt ( CommonConfigurationKeys . IPC_CLIENT_CONNECT_MAX_RETRIES_KEY , 0 ) ; conf . setInt ( org . apache . hadoop . hdfs . DFSConfigKeys . DFS_DATANODE_METRICS_LOGGER_PERIOD_SECONDS_KEY , ( enableMetricsLogging ? 1 : 0 ) ) ; dn = org . apache . hadoop . hdfs . server . datanode . InternalDataNodeTestUtils . startDNWithMockNN ( conf , org . apache . hadoop . hdfs . server . datanode . TestDataNodeMetricsLogger . NN_ADDR , org . apache . hadoop . hdfs . server . datanode . TestDataNodeMetricsLogger . DATA_DIR ) ; } | org . junit . Assert . assertNotNull ( dn ) |
testGetArrow ( ) { final elemental2 . dom . Element element = mock ( elemental2 . dom . Element . class ) ; doReturn ( element ) . when ( view ) . querySelector ( "arrow-button" ) ; "<AssertPlaceHolder>" ; } getArrow ( ) { return querySelector ( "arrow-button" ) ; } | org . junit . Assert . assertEquals ( element , view . getArrow ( ) ) |
testPersoonNationaliteitCorrect ( ) { java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > overtreders = brby9910 . voerRegelUit ( maakPersoonNationaliteitView ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . bericht . request . BRBY9910Test . GROEPID1 ) , maakPersoonNationaliteitBericht ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . bericht . request . BRBY9910Test . GROEPID1 ) , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , overtreders . size ( ) ) |
encode_7 ( ) { final java . lang . String arg = "foobar" ; final java . lang . String exp = "Zm9vYmFy" ; "<AssertPlaceHolder>" ; } encode ( byte [ ] ) { final int sourceChunks = ( data . length ) / 3 ; final int len = ( ( ( data . length ) + 2 ) / 3 ) * 4 ; final byte [ ] result = new byte [ len ] ; final int extraBytes = ( data . length ) - ( sourceChunks * 3 ) ; int dataIndex = 0 ; int resultIndex = 0 ; int allBits = 0 ; for ( int i = 0 ; i < sourceChunks ; i ++ ) { allBits = 0 ; for ( int j = 0 ; j < 3 ; j ++ ) { allBits = ( allBits << 8 ) | ( ( data [ ( dataIndex ++ ) ] ) & 255 ) ; } for ( int j = resultIndex + 3 ; j >= resultIndex ; j -- ) { result [ j ] = ( ( byte ) ( org . erlide . util . Base64 . digits [ ( allBits & 63 ) ] ) ) ; allBits = allBits > > > 6 ; } resultIndex += 4 ; } if ( extraBytes == 1 ) { allBits = data [ ( dataIndex ++ ) ] ; allBits = allBits << 8 ; allBits = allBits << 8 ; for ( int j = resultIndex + 3 ; j >= resultIndex ; j -- ) { result [ j ] = ( ( byte ) ( org . erlide . util . Base64 . digits [ ( allBits & 63 ) ] ) ) ; allBits = allBits > > > 6 ; } result [ ( ( result . length ) - 1 ) ] = ( ( byte ) ( '=' ) ) ; result [ ( ( result . length ) - 2 ) ] = ( ( byte ) ( '=' ) ) ; } else if ( extraBytes == 2 ) { allBits = data [ ( dataIndex ++ ) ] ; allBits = ( allBits << 8 ) | ( ( data [ ( dataIndex ++ ) ] ) & 255 ) ; allBits = allBits << 8 ; for ( int j = resultIndex + 3 ; j >= resultIndex ; j -- ) { result [ j ] = ( ( byte ) ( org . erlide . util . Base64 . digits [ ( allBits & 63 ) ] ) ) ; allBits = allBits > > > 6 ; } result [ ( ( result . length ) - 1 ) ] = ( ( byte ) ( '=' ) ) ; } return result ; } | org . junit . Assert . assertEquals ( exp , new java . lang . String ( org . erlide . util . Base64 . encode ( arg . getBytes ( ) ) ) ) |
testVisitRelationshipCommand ( ) { org . neo4j . kernel . impl . transaction . command . Command . RelationshipCommand cmd = mock ( Command . RelationshipCommand . class ) ; when ( cmd . handle ( any ( org . neo4j . kernel . impl . api . CommandVisitor . class ) ) ) . thenCallRealMethod ( ) ; boolean result = facade . visitRelationshipCommand ( cmd ) ; org . mockito . InOrder inOrder = inOrder ( txApplier1 , txApplier2 , txApplier3 ) ; inOrder . verify ( txApplier1 ) . visitRelationshipCommand ( cmd ) ; inOrder . verify ( txApplier2 ) . visitRelationshipCommand ( cmd ) ; inOrder . verify ( txApplier3 ) . visitRelationshipCommand ( cmd ) ; inOrder . verifyNoMoreInteractions ( ) ; "<AssertPlaceHolder>" ; } visitRelationshipCommand ( org . neo4j . storageengine . api . ReadableChannel ) { long id = channel . getLong ( ) ; byte flags = channel . get ( ) ; boolean inUse = false ; if ( ( notFlag ( notFlag ( flags , Record . IN_USE . byteValue ( ) ) , Record . CREATED_IN_TX ) ) != 0 ) { throw new java . io . IOException ( ( "Illegal<sp>in<sp>use<sp>flag:<sp>" + flags ) ) ; } if ( bitFlag ( flags , Record . IN_USE . byteValue ( ) ) ) { inUse = true ; } org . neo4j . kernel . impl . store . record . RelationshipRecord record ; if ( inUse ) { record = new org . neo4j . kernel . impl . store . record . RelationshipRecord ( id , channel . getLong ( ) , channel . getLong ( ) , channel . getInt ( ) ) ; record . setInUse ( true ) ; record . setFirstPrevRel ( channel . getLong ( ) ) ; record . setFirstNextRel ( channel . getLong ( ) ) ; record . setSecondPrevRel ( channel . getLong ( ) ) ; record . setSecondNextRel ( channel . getLong ( ) ) ; record . setNextProp ( channel . getLong ( ) ) ; byte extraByte = channel . get ( ) ; record . setFirstInFirstChain ( ( ( extraByte & 1 ) > 0 ) ) ; record . setFirstInSecondChain ( ( ( extraByte & 2 ) > 0 ) ) ; } else { record = new org . neo4j . kernel . impl . store . record . RelationshipRecord ( id , ( - 1 ) , ( - 1 ) , channel . getInt ( ) ) ; record . setInUse ( false ) ; } if ( bitFlag ( flags , Record . CREATED_IN_TX ) ) { record . setCreated ( ) ; } return new org . neo4j . kernel . impl . transaction . command . Command . RelationshipCommand ( null , record ) ; } | org . junit . Assert . assertFalse ( result ) |
buildingFromVariableLengthByteArrayIndexedListTestCharUnsafe ( ) { final java . util . List < com . yandex . yoctodb . util . UnsignedByteArray > elements = new java . util . ArrayList ( ) ; elements . add ( com . yandex . yoctodb . util . UnsignedByteArrays . from ( 'a' ) ) ; elements . add ( com . yandex . yoctodb . util . UnsignedByteArrays . from ( 'b' ) ) ; elements . add ( com . yandex . yoctodb . util . UnsignedByteArrays . from ( 'c' ) ) ; elements . add ( com . yandex . yoctodb . util . UnsignedByteArrays . from ( 'd' ) ) ; elements . add ( com . yandex . yoctodb . util . UnsignedByteArrays . from ( 'e' ) ) ; final com . yandex . yoctodb . util . buf . Buffer bb = prepareDataFromVariableLengthByteArrayIndexedLength ( elements ) ; final com . yandex . yoctodb . util . immutable . ByteArrayIndexedList list = com . yandex . yoctodb . util . immutable . impl . VariableLengthByteArrayIndexedList . from ( bb ) ; for ( int i = 0 ; i < ( elements . size ( ) ) ; i ++ ) { final long puttedValue = elements . get ( i ) . toByteBuffer ( ) . getChar ( ) ; "<AssertPlaceHolder>" ; } } getCharUnsafe ( int ) { assert ( 0 <= docId ) && ( docId < ( elementCount ) ) ; final long offsetIndex = ( getOffsetIndex . apply ( docId ) ) * ( Long . BYTES ) ; final long start = offsets . getLong ( offsetIndex ) ; return elements . getChar ( start ) ; } | org . junit . Assert . assertEquals ( puttedValue , list . getCharUnsafe ( i ) ) |
shouldBuildMetadataWithUserId ( ) { final java . lang . String userId = "a51597dc-2526-4c71-bd08-5031c79f11e3" ; final uk . gov . justice . services . messaging . Metadata metadata = metadataWithDefaults ( ) . withUserId ( userId ) . build ( ) ; "<AssertPlaceHolder>" ; } userId ( ) { return metadata . userId ( ) ; } | org . junit . Assert . assertThat ( metadata . userId ( ) . get ( ) , org . hamcrest . Matchers . is ( userId ) ) |
testGetPrefixForNamespaceURIWhenPrefixForNamespaceURIIsPresent ( ) { final java . lang . String namespaceURI = org . kie . workbench . common . dmn . client . editors . types . common . FEEL . getUri ( ) ; final org . kie . workbench . common . dmn . api . definition . v1_1 . Definitions definitions = mock ( org . kie . workbench . common . dmn . api . definition . v1_1 . Definitions . class ) ; final java . util . Optional < java . lang . String > expectedPrefix = java . util . Optional . of ( "prefix" ) ; when ( dmnGraphUtils . getDefinitions ( ) ) . thenReturn ( definitions ) ; when ( definitions . getPrefixForNamespaceURI ( namespaceURI ) ) . thenReturn ( expectedPrefix ) ; final java . util . Optional < java . lang . String > actualPrefix = utils . getPrefixForNamespaceURI ( namespaceURI ) ; "<AssertPlaceHolder>" ; } getPrefixForNamespaceURI ( java . lang . String ) { if ( ( ( nsContext ) != null ) && ( nsContext . containsValue ( namespaceURI ) ) ) { return nsContext . entrySet ( ) . stream ( ) . filter ( ( kv ) -> java . util . Objects . equals ( kv . getValue ( ) , namespaceURI ) ) . findFirst ( ) . map ( java . util . Map . Entry :: getKey ) ; } if ( ( this . parent ) != null ) { return parent . getPrefixForNamespaceURI ( namespaceURI ) ; } return java . util . Optional . empty ( ) ; } | org . junit . Assert . assertEquals ( expectedPrefix , actualPrefix ) |
submitTaskToThreadExecutorSetInConfiguration ( ) { org . digidoc4j . impl . bdoc . xades . validation . ThreadPoolManagerTest . CustomExecutorService executor = new org . digidoc4j . impl . bdoc . xades . validation . ThreadPoolManagerTest . CustomExecutorService ( ) ; this . configuration . setThreadExecutor ( executor ) ; java . util . concurrent . Callable callable = new java . util . concurrent . Callable < java . lang . Object > ( ) { @ org . digidoc4j . impl . bdoc . xades . validation . Override public java . lang . Object call ( ) throws org . digidoc4j . impl . bdoc . xades . validation . Exception { return null ; } } ; this . manager . submit ( callable ) ; "<AssertPlaceHolder>" ; } getTasks ( ) { return tasks ; } | org . junit . Assert . assertSame ( callable , executor . getTasks ( ) . get ( 0 ) ) |
testStringConstructor ( ) { java . lang . String expectedValue = "expected" ; de . metanome . algorithm_integration . configuration . ConfigurationSettingString setting = new de . metanome . algorithm_integration . configuration . ConfigurationSettingString ( expectedValue ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( expectedValue , setting . getValue ( ) ) |
testFindStudentWithAddressById ( ) { com . mybatis3 . domain . Student student = studentService . findStudentWithAddressById ( 2 ) ; "<AssertPlaceHolder>" ; System . out . println ( ( ( ( student . getAddress ( ) . getAddrId ( ) ) + ":" ) + ( student . getAddress ( ) . getCity ( ) ) ) ) ; } | org . junit . Assert . assertNotNull ( student ) |
convert_to_stream_of_objects ( ) { int [ ] numbers = new int [ ] { 1 , 2 , 3 , 4 , 5 , 6 } ; java . util . List < java . lang . Integer > listOfInteger = java . util . Arrays . stream ( numbers ) . boxed ( ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( listOfInteger , contains ( new java . lang . Integer ( 1 ) , new java . lang . Integer ( 2 ) , new java . lang . Integer ( 3 ) , new java . lang . Integer ( 4 ) , new java . lang . Integer ( 5 ) , new java . lang . Integer ( 6 ) ) ) |
testDefaultSampleSize ( ) { java . io . File source = new java . io . File ( "src/test/java/org/jcodec/containers/mp4/demuxer/a01_0023.mp4" ) ; org . jcodec . common . io . SeekableByteChannel input = new org . jcodec . common . AutoFileChannelWrapper ( source ) ; org . jcodec . containers . mp4 . demuxer . MP4Demuxer demuxer = org . jcodec . containers . mp4 . demuxer . MP4Demuxer . createMP4Demuxer ( input ) ; org . jcodec . containers . mp4 . demuxer . PCMMP4DemuxerTrack track = ( ( org . jcodec . containers . mp4 . demuxer . PCMMP4DemuxerTrack ) ( demuxer . getAudioTracks ( ) . get ( 0 ) ) ) ; "<AssertPlaceHolder>" ; } getFrameSize ( ) { int size = stsz . getDefaultSize ( ) ; org . jcodec . containers . mp4 . boxes . Box box = stsd . getBoxes ( ) . get ( ( ( sampleToChunk [ s2cIndex ] . getEntry ( ) ) - 1 ) ) ; if ( box instanceof org . jcodec . containers . mp4 . boxes . AudioSampleEntry ) { return ( ( org . jcodec . containers . mp4 . boxes . AudioSampleEntry ) ( box ) ) . calcFrameSize ( ) ; } return size ; } | org . junit . Assert . assertEquals ( 6 , track . getFrameSize ( ) ) |
testObjectSerialization ( ) { com . owlike . genson . Genson genson = createTimestampGenson ( java . time . Year . class , TimestampFormat . OBJECT ) ; java . time . Year year = java . time . Year . of ( 2011 ) ; java . lang . String json = "{\"year\":2011}" ; "<AssertPlaceHolder>" ; } serialize ( java . lang . Object ) { com . owlike . genson . StringWriter sw = new com . owlike . genson . StringWriter ( ) ; com . owlike . genson . ObjectWriter writer = createWriter ( sw ) ; if ( object == null ) serializeNull ( writer ) ; else serialize ( object , object . getClass ( ) , writer , new com . owlike . genson . Context ( this ) ) ; return sw . toString ( ) ; } | org . junit . Assert . assertEquals ( json , genson . serialize ( year ) ) |
test2 ( ) { net . minidev . json . JSONObject objectSource = ( ( jsonSource ) != null ) ? ( ( net . minidev . json . JSONObject ) ( net . minidev . json . JSONValue . parseWithException ( jsonSource ) ) ) : null ; net . minidev . json . actions . PathReplicator copier = switchKeyToCopy2 ( ) ; net . minidev . json . JSONObject copied = copier . replicate ( objectSource ) ; net . minidev . json . JSONObject expectedObj = ( ( expected ) != null ) ? ( ( net . minidev . json . JSONObject ) ( net . minidev . json . JSONValue . parseWithException ( ( ( java . lang . String ) ( expected ) ) ) ) ) : null ; "<AssertPlaceHolder>" ; } parseWithException ( byte [ ] ) { return new net . minidev . json . parser . JSONParser ( DEFAULT_PERMISSIVE_MODE ) . parse ( in , net . minidev . json . JSONValue . defaultReader . DEFAULT ) ; } | org . junit . Assert . assertEquals ( expectedObj , copied ) |
createIndividualEnrollmentQueryWithPageSizeSucceed ( tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . QuerySpecification ) { tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . ProvisioningServiceClient provisioningServiceClient = createClient ( ) ; new mockit . NonStrictExpectations ( ) { { mockit . Deencapsulation . invoke ( mockedIndividualEnrollmentManager , "createQuery" , mockedQuerySpecification , 10 ) ; times = 1 ; } } ; tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . Query query = provisioningServiceClient . createIndividualEnrollmentQuery ( mockedQuerySpecification , 10 ) ; "<AssertPlaceHolder>" ; } createIndividualEnrollmentQuery ( com . microsoft . azure . sdk . iot . provisioning . service . QuerySpecification , int ) { return individualEnrollmentManager . createQuery ( querySpecification , pageSize ) ; } | org . junit . Assert . assertNotNull ( query ) |
loadStoredSettingsShouldNotSetSystemColorIfNotSet ( ) { settingsLoader . loadStoredSettings ( context , settings ) ; "<AssertPlaceHolder>" ; } getSysColor ( ) { return sysColor ; } | org . junit . Assert . assertEquals ( 0 , settings . getSysColor ( ) ) |
testGetExtractorInstance ( ) { com . stratio . deep . commons . config . BaseConfig < com . stratio . deep . commons . entity . Cells , com . stratio . deep . commons . config . BaseConfig > baseConfig = new com . stratio . deep . commons . config . BaseConfig ( ) ; baseConfig . setEntityClass ( com . stratio . deep . commons . entity . Cells . class ) ; baseConfig . setExtractorImplClass ( com . stratio . deep . commons . utils . UtilsTest . testExtractor . class ) ; com . stratio . deep . commons . rdd . IExtractor extractorInstance1 = com . stratio . deep . commons . utils . Utils . getExtractorInstance ( baseConfig ) ; "<AssertPlaceHolder>" ; } getExtractorInstance ( S extends com . stratio . deep . commons . config . BaseConfig ) { try { java . lang . Class < T > rdd = ( ( java . lang . Class < T > ) ( config . getExtractorImplClass ( ) ) ) ; if ( rdd == null ) { rdd = ( ( java . lang . Class < T > ) ( java . lang . Class . forName ( config . getExtractorImplClassName ( ) ) ) ) ; } java . lang . reflect . Constructor < T > c ; if ( config . getEntityClass ( ) . isAssignableFrom ( com . stratio . deep . commons . entity . Cells . class ) ) { c = rdd . getConstructor ( ) ; return ( ( com . stratio . deep . commons . rdd . IExtractor < T , S > ) ( c . newInstance ( ) ) ) ; } else { c = rdd . getConstructor ( java . lang . Class . class ) ; return ( ( com . stratio . deep . commons . rdd . IExtractor < T , S > ) ( c . newInstance ( config . getEntityClass ( ) ) ) ) ; } } catch ( java . lang . ClassNotFoundException | java . lang . InstantiationException | java . lang . IllegalAccessException | java . lang . IllegalArgumentException | java . lang . reflect . InvocationTargetException | java . lang . NoSuchMethodException | java . lang . SecurityException e ) { java . lang . String message = "A<sp>exception<sp>happens<sp>and<sp>we<sp>wrap<sp>with<sp>DeepExtractorInitializationException" + ( e . getMessage ( ) ) ; com . stratio . deep . commons . utils . Utils . LOG . error ( message ) ; throw new com . stratio . deep . commons . exception . DeepExtractorInitializationException ( message , e ) ; } } | org . junit . Assert . assertNotNull ( extractorInstance1 ) |
testExecute_NoJSObjectReturned ( ) { java . lang . String command = "myCommand" ; when ( mockWebEngine . executeScript ( command ) ) . thenReturn ( "Hello" ) ; "<AssertPlaceHolder>" ; } getInstance ( ) { if ( ( com . lynden . gmapsfx . javascript . JavascriptRuntime . runtime ) == null ) { com . lynden . gmapsfx . javascript . JavascriptRuntime . runtime = new com . lynden . gmapsfx . javascript . JavascriptRuntime ( ) ; } return com . lynden . gmapsfx . javascript . JavascriptRuntime . runtime ; } | org . junit . Assert . assertNull ( com . lynden . gmapsfx . javascript . JavascriptRuntime . getInstance ( ) . execute ( command ) ) |
getParameterId ( ) { java . lang . String id = row . getParameterId ( ) ; "<AssertPlaceHolder>" ; } getParameterId ( ) { return null ; } | org . junit . Assert . assertEquals ( parameter . getParameterId ( ) , id ) |
shouldReturnOldChannelWhenNextChannelHasntGottenCompleteHeaderYet ( ) { final org . neo4j . kernel . impl . transaction . log . ReaderLogVersionBridge bridge = new org . neo4j . kernel . impl . transaction . log . ReaderLogVersionBridge ( logFiles ) ; final org . neo4j . io . fs . StoreChannel nextVersionWithIncompleteHeader = mock ( org . neo4j . io . fs . StoreChannel . class ) ; when ( nextVersionWithIncompleteHeader . read ( any ( java . nio . ByteBuffer . class ) ) ) . thenReturn ( ( ( LOG_HEADER_SIZE ) / 2 ) ) ; when ( channel . getVersion ( ) ) . thenReturn ( version ) ; when ( fs . fileExists ( any ( java . io . File . class ) ) ) . thenReturn ( true ) ; when ( fs . open ( any ( java . io . File . class ) , eq ( OpenMode . READ ) ) ) . thenReturn ( nextVersionWithIncompleteHeader ) ; final org . neo4j . kernel . impl . transaction . log . LogVersionedStoreChannel result = bridge . next ( channel ) ; "<AssertPlaceHolder>" ; verify ( channel , never ( ) ) . close ( ) ; } next ( long ) { throw new java . lang . UnsupportedOperationException ( ) ; } | org . junit . Assert . assertEquals ( channel , result ) |
testStateSetup ( ) { org . pentaho . reporting . engine . classic . core . MasterReport r = new org . pentaho . reporting . engine . classic . core . MasterReport ( ) ; r . getWatermark ( ) . setAttribute ( AttributeNames . Core . NAMESPACE , AttributeNames . Core . WATERMARK_PRINTED_ON_TOP , true ) ; org . pentaho . reporting . engine . classic . core . layout . output . DefaultProcessingContext pc = new org . pentaho . reporting . engine . classic . core . layout . output . DefaultProcessingContext ( r ) ; org . pentaho . reporting . engine . classic . core . states . process . ProcessState state = new org . pentaho . reporting . engine . classic . core . states . process . ProcessState ( ) ; state . initializeForMasterReport ( r , pc , new org . pentaho . reporting . engine . classic . core . layout . output . DefaultOutputFunction ( ) ) ; org . pentaho . reporting . engine . classic . core . layout . output . OutputProcessorMetaData md = state . getFlowController ( ) . getReportContext ( ) . getOutputProcessorMetaData ( ) ; "<AssertPlaceHolder>" ; } isFeatureSupported ( org . pentaho . reporting . engine . classic . core . layout . output . OutputProcessorFeature$BooleanOutputProcessorFeature ) { if ( OutputProcessorFeature . LEGACY_LINEHEIGHT_CALC . equals ( feature ) ) { return false ; } return super . isFeatureSupported ( feature ) ; } | org . junit . Assert . assertTrue ( md . isFeatureSupported ( OutputProcessorFeature . WATERMARK_PRINTED_ON_TOP ) ) |
testR1586_Bsn_Persoon_Pseudo ( ) { final nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . PersoonParameters persoonParameters = new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . PersoonParameters ( ) ; final nl . bzk . brp . bijhouding . bericht . model . PersoonGegevensElement nieuwPersoon = builder . maakPersoonGegevensElement ( attr , persoonParameters ) ; final java . util . Map < java . lang . String , nl . bzk . brp . bijhouding . bericht . model . BmrGroep > commMap = new java . util . HashMap ( ) ; commMap . put ( nl . bzk . brp . bijhouding . bericht . model . RegistratieIdentificatienummersActieElementTest . COMM_ID , nieuwPersoon ) ; when ( getPersoonRepository ( ) . komtBsnReedsVoor ( anyString ( ) ) ) . thenReturn ( true ) ; final nl . bzk . brp . bijhouding . bericht . model . RegistratieIdentificatienummersActieElement actieElement = maakElement ( nl . bzk . brp . bijhouding . bericht . model . RegistratieIdentificatienummersActieElementTest . ANUMMER , nl . bzk . brp . bijhouding . bericht . model . RegistratieIdentificatienummersActieElementTest . BSN ) ; final nl . bzk . brp . bijhouding . bericht . model . PersoonGegevensElement persoon = actieElement . getPersoon ( ) ; persoon . initialiseer ( commMap ) ; final java . util . List < nl . bzk . brp . bijhouding . bericht . model . MeldingElement > meldingen = actieElement . valideerSpecifiekeInhoud ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) ) |
whenContainerIsNullReturnTrueWhenDelegateReturnsTrue ( ) { when ( delegate . handle ( org . mockito . Matchers . any ( org . atlasapi . equiv . results . EquivalenceResult . class ) ) ) . thenReturn ( true ) ; subject . setParentRef ( null ) ; org . atlasapi . equiv . results . EquivalenceResult < org . atlasapi . media . entity . Item > result = new org . atlasapi . equiv . results . EquivalenceResult < org . atlasapi . media . entity . Item > ( subject , noScores , emptyCombined , com . google . common . collect . ImmutableMultimap . of ( Publisher . PA , org . atlasapi . equiv . results . scores . ScoredCandidate . valueOf ( new org . atlasapi . media . entity . Item ( ) , Score . ONE ) ) , new org . atlasapi . equiv . results . description . DefaultDescription ( ) ) ; org . atlasapi . equiv . handlers . EquivalenceResultHandler < org . atlasapi . media . entity . Item > handler = org . atlasapi . equiv . handlers . EpisodeFilteringEquivalenceResultHandler . relaxed ( delegate , summaryStore ) ; "<AssertPlaceHolder>" ; } handle ( org . atlasapi . equiv . results . EquivalenceResults ) { org . atlasapi . equiv . results . description . ResultDescription desc = results . description ( ) . startStage ( "Episode<sp>parent<sp>filter" ) ; org . atlasapi . media . entity . ParentRef container = results . subject ( ) . getContainer ( ) ; if ( container == null ) { desc . appendText ( "Item<sp>has<sp>no<sp>Container" ) . finishStage ( ) ; return delegate . handle ( results ) ; } java . lang . String containerUri = container . getUri ( ) ; com . google . common . base . Optional < org . atlasapi . equiv . EquivalenceSummary > possibleSummary = summaryStore . summariesForUris ( com . google . common . collect . ImmutableSet . of ( containerUri ) ) . get ( containerUri ) ; if ( ! ( possibleSummary . isPresent ( ) ) ) { desc . appendText ( "Item<sp>Container<sp>summary<sp>not<sp>found" ) . finishStage ( ) ; throw new org . atlasapi . equiv . handlers . ContainerSummaryRequiredException ( results . subject ( ) ) ; } org . atlasapi . equiv . EquivalenceSummary summary = possibleSummary . get ( ) ; com . google . common . collect . Multimap < org . atlasapi . media . entity . Publisher , org . atlasapi . equiv . ContentRef > equivalents = summary . getEquivalents ( ) ; java . util . List < org . atlasapi . equiv . results . EquivalenceResult < org . atlasapi . media . entity . Item > > filteredEquivalenceResults = results . getResults ( ) . stream ( ) . map ( ( result ) -> new org . atlasapi . equiv . handlers . EquivalenceResult < > ( result . subject ( ) , result . rawScores ( ) , result . combinedEquivalences ( ) , filter ( result . strongEquivalences ( ) , equivalents , desc ) , result . description ( ) ) ) . collect ( com . metabroadcast . common . stream . MoreCollectors . toImmutableList ( ) ) ; desc . finishStage ( ) ; return delegate . handle ( new org . atlasapi . equiv . results . EquivalenceResults ( results . subject ( ) , filteredEquivalenceResults , ( ( org . atlasapi . equiv . results . description . ReadableDescription ) ( desc ) ) ) ) ; } | org . junit . Assert . assertThat ( handler . handle ( result ) , org . hamcrest . core . Is . is ( true ) ) |
testFindTopKHeap ( ) { java . util . Collection < org . neo4j . graphalgo . impl . util . TopKConsumerTest . Item > topItems = org . neo4j . graphalgo . similarity . TopKConsumer . topK ( asList ( org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM1 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM3 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM2 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM4 ) , 2 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . Item :: compareTo ) ; "<AssertPlaceHolder>" ; for ( org . neo4j . graphalgo . impl . util . TopKConsumerTest . Item topItem : topItems ) { System . out . println ( topItem ) ; } } | org . junit . Assert . assertEquals ( asList ( org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM4 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM3 ) , topItems ) |
testBasicJAXBSerialization ( ) { org . orbisgis . coremap . renderer . se . parameter . string . StringAttribute sa = new org . orbisgis . coremap . renderer . se . parameter . string . StringAttribute ( "bonjour" ) ; javax . xml . bind . JAXBElement < ? > je = sa . getJAXBExpressionType ( ) ; sa = new org . orbisgis . coremap . renderer . se . parameter . string . StringAttribute ( ( ( javax . xml . bind . JAXBElement < java . lang . String > ) ( je ) ) ) ; "<AssertPlaceHolder>" ; } getColumnName ( ) { return fieldName ; } | org . junit . Assert . assertTrue ( sa . getColumnName ( ) . equals ( "bonjour" ) ) |
testShouldNotReturnItFromExplicitlyAddedPortlets ( ) { com . liferay . portal . kernel . service . PortletPreferencesLocalServiceUtil . addPortletPreferences ( com . liferay . portal . kernel . test . util . TestPropsValues . getCompanyId ( ) , PortletKeys . PREFS_OWNER_ID_DEFAULT , PortletKeys . PREFS_OWNER_TYPE_LAYOUT , layout . getPlid ( ) , _testNonembeddedPortlet . getPortletId ( ) , _testNonembeddedPortlet , null ) ; java . util . List < com . liferay . portal . kernel . model . Portlet > explicitlyAddedPortlets = com . liferay . portal . osgi . web . portlet . container . embedded . test . EmbeddedPortletWhenEmbeddingNonembeddablePortletInLayoutTest . _layoutTypePortlet . getExplicitlyAddedPortlets ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; } | org . junit . Assert . assertFalse ( explicitlyAddedPortlets . toString ( ) , explicitlyAddedPortlets . contains ( _testNonembeddedPortlet ) ) |
test_getPathInWorkspace_windows_JENKINS_44088 ( ) { java . lang . String workspace = "C:/Jenkins/workspace/maven-pipeline-plugin-test" ; java . lang . String absolutePath = "C:\\Jenkins\\workspace\\maven-pipeline-plugin-test\\pom.xml" ; java . lang . String actual = org . jenkinsci . plugins . pipeline . maven . util . XmlUtils . getPathInWorkspace ( absolutePath , new hudson . FilePath ( new java . io . File ( workspace ) ) ) ; java . lang . String expected = "pom.xml" ; "<AssertPlaceHolder>" ; } getPathInWorkspace ( java . lang . String , hudson . FilePath ) { boolean windows = org . jenkinsci . plugins . pipeline . maven . util . FileUtils . isWindows ( workspace ) ; final java . lang . String workspaceRemote = workspace . getRemote ( ) ; java . lang . String sanitizedAbsoluteFilePath ; java . lang . String sanitizedWorkspaceRemote ; if ( windows ) { sanitizedWorkspaceRemote = workspaceRemote . replace ( '/' , '\\' ) ; sanitizedAbsoluteFilePath = absoluteFilePath . replace ( '/' , '\\' ) ; } else if ( ( workspaceRemote . startsWith ( "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 2 ) ) && ( absoluteFilePath . startsWith ( "/private/var/" ) ) ) { sanitizedWorkspaceRemote = workspaceRemote ; sanitizedAbsoluteFilePath = absoluteFilePath . substring ( "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 1.le ngth ( ) ) ; } else { sanitizedAbsoluteFilePath = absoluteFilePath ; sanitizedWorkspaceRemote = workspaceRemote ; } if ( org . apache . commons . lang . StringUtils . startsWithIgnoreCase ( sanitizedAbsoluteFilePath , sanitizedWorkspaceRemote ) ) { } else if ( ( sanitizedWorkspaceRemote . contains ( "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 ) ) && ( sanitizedAbsoluteFilePath . contains ( "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 ) ) ) { sanitizedAbsoluteFilePath = "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 + ( org . apache . commons . lang . StringUtils . substringAfter ( sanitizedAbsoluteFilePath , "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 ) ) ; sanitizedWorkspaceRemote = "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 + ( org . apache . commons . lang . StringUtils . substringAfter ( sanitizedWorkspaceRemote , "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 ) ) ; } else if ( ( sanitizedWorkspaceRemote . endsWith ( "/workspace" ) ) && ( sanitizedAbsoluteFilePath . contains ( "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 ) ) ) { sanitizedAbsoluteFilePath = "workspace/" + ( org . apache . commons . lang . StringUtils . substringAfter ( sanitizedAbsoluteFilePath , "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 ) ) ; sanitizedWorkspaceRemote = "workspace/" ; } else { throw new java . lang . IllegalArgumentException ( ( ( ( ( "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 0 + absoluteFilePath ) + "'<sp>relatively<sp>to<sp>'" ) + ( workspace . getRemote ( ) ) ) + "'" ) ) ; } java . lang . String relativePath = org . apache . commons . lang . StringUtils . removeStartIgnoreCase ( sanitizedAbsoluteFilePath , sanitizedWorkspaceRemote ) ; java . lang . String fileSeparator = ( windows ) ? "\\" : "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 4 ; if ( relativePath . startsWith ( fileSeparator ) ) { relativePath = relativePath . substring ( fileSeparator . length ( ) ) ; } org . jenkinsci . plugins . pipeline . maven . util . XmlUtils . LOGGER . log ( Level . FINEST , "getPathInWorkspace({0},<sp>{1}:<sp>{2}" , new java . lang . Object [ ] { absoluteFilePath , workspaceRemote , relativePath } ) ; return relativePath ; } | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
testIfThenElseBug4 ( ) { java . lang . String query = "TO_INTEGER(true<sp>==<sp>true<sp>?<sp>10.0<sp>:<sp>20.0<sp>)" ; "<AssertPlaceHolder>" ; } run ( org . apache . curator . framework . CuratorFramework , org . apache . commons . cli . CommandLine ) { final boolean force = org . apache . metron . common . cli . ConfigurationManager . ConfigurationOptions . FORCE . has ( cli ) ; java . lang . String mode = org . apache . metron . common . cli . ConfigurationManager . ConfigurationOptions . MODE . get ( cli ) ; java . util . Optional < java . lang . String > configType = java . util . Optional . ofNullable ( org . apache . metron . common . cli . ConfigurationManager . ConfigurationOptions . CONFIG_TYPE . get ( cli ) ) ; java . util . Optional < java . lang . String > configName = java . util . Optional . ofNullable ( org . apache . metron . common . cli . ConfigurationManager . ConfigurationOptions . CONFIG_NAME . get ( cli ) ) ; switch ( mode . toLowerCase ( ) ) { case "push" : java . lang . String inputDirStr = org . apache . metron . common . cli . ConfigurationManager . ConfigurationOptions . INPUT . get ( cli ) ; if ( org . apache . commons . lang3 . StringUtils . isEmpty ( inputDirStr ) ) { throw new java . lang . IllegalArgumentException ( "Input<sp>directory<sp>is<sp>required<sp>when<sp>performing<sp>a<sp>PUSH<sp>operation." ) ; } if ( configType . isPresent ( ) ) { push ( inputDirStr , client , org . apache . metron . common . configuration . ConfigurationType . valueOf ( configType . get ( ) ) , configName ) ; } else { push ( inputDirStr , client ) ; } break ; case "dump" : if ( configType . isPresent ( ) ) { dump ( client , org . apache . metron . common . configuration . ConfigurationType . valueOf ( configType . get ( ) ) , configName ) ; } else { dump ( client ) ; } break ; case "pull" : pull ( client , org . apache . metron . common . cli . ConfigurationManager . ConfigurationOptions . OUTPUT . get ( cli ) , force ) ; break ; case "patch" : if ( configType . isPresent ( ) ) { java . util . Optional < java . lang . String > patchPath = java . util . Optional . ofNullable ( org . apache . metron . common . cli . ConfigurationManager . ConfigurationOptions . PATCH_FILE . get ( cli ) ) ; java . util . Optional < java . lang . String > patchMode = java . util . Optional . ofNullable ( org . apache . metron . common . cli . ConfigurationManager . ConfigurationOptions . PATCH_MODE . get ( cli ) ) ; java . util . Optional < java . lang . String > patchKey = java . util . Optional . ofNullable ( org . apache . metron . common . cli . ConfigurationManager . ConfigurationOptions . PATCH_KEY . get ( cli ) ) ; java . util . Optional < java . lang . String > patchValue = java . util . Optional . ofNullable ( org . apache . metron . common . cli . ConfigurationManager . ConfigurationOptions . PATCH_VALUE . get ( cli ) ) ; patch ( client , org . apache . metron . common . configuration . ConfigurationType . valueOf ( configType . get ( ) ) , configName , patchMode , patchPath , patchKey , patchValue ) ; } else { throw new java . lang . IllegalArgumentException ( "Patch<sp>requires<sp>config<sp>type" ) ; } break ; default : throw new java . lang . IllegalStateException ( ( ( "Invalid<sp>mode:<sp>" + mode ) + "<sp>expected<sp>DUMP,<sp>PULL,<sp>PUSH,<sp>or<sp>PATCH" ) ) ; } } | org . junit . Assert . assertEquals ( 10 , run ( query , new java . util . HashMap ( ) ) ) |
testConstructorGood ( ) { org . eclipse . tracecompass . tmf . core . statesystem . TmfAttributePool pool = new org . eclipse . tracecompass . tmf . core . statesystem . TmfAttributePool ( fStateSystem , org . eclipse . tracecompass . statesystem . core . ITmfStateSystem . ROOT_ATTRIBUTE ) ; "<AssertPlaceHolder>" ; int quark = fStateSystem . getQuarkAbsoluteAndAdd ( org . eclipse . tracecompass . tmf . core . tests . statesystem . AttributePoolTest . DUMMY_STRING ) ; pool = new org . eclipse . tracecompass . tmf . core . statesystem . TmfAttributePool ( fStateSystem , quark ) ; } | org . junit . Assert . assertNotNull ( pool ) |
testJmxDisable ( ) { javax . management . MBeanServer server = java . lang . management . ManagementFactory . getPlatformMBeanServer ( ) ; javax . management . ObjectName filter = new javax . management . ObjectName ( "org.mariadb.jdbc.pool:type=PoolTest-*" ) ; try ( org . mariadb . jdbc . MariaDbPoolDataSource pool = new org . mariadb . jdbc . MariaDbPoolDataSource ( ( ( connUri ) + "&maxPoolSize=2®isterJmxPool=false&poolName=PoolTest" ) ) ) { try ( java . sql . Connection connection = pool . getConnection ( ) ) { java . util . Set < javax . management . ObjectName > objectNames = server . queryNames ( filter , null ) ; "<AssertPlaceHolder>" ; } } } getConnection ( ) { pendingRequestNumber . incrementAndGet ( ) ; org . mariadb . jdbc . MariaDbPooledConnection pooledConnection ; try { if ( ( pooledConnection = getIdleConnection ( ( ( totalConnection . get ( ) ) > 4 ? 0 : 50 ) , TimeUnit . MICROSECONDS ) ) != null ) { return pooledConnection . getConnection ( ) ; } addConnectionRequest ( ) ; if ( ( pooledConnection = getIdleConnection ( TimeUnit . MILLISECONDS . toNanos ( options . connectTimeout ) , TimeUnit . NANOSECONDS ) ) != null ) { return pooledConnection . getConnection ( ) ; } throw org . mariadb . jdbc . internal . util . exceptions . ExceptionMapper . connException ( ( ( ( "No<sp>connection<sp>available<sp>within<sp>the<sp>specified<sp>time<sp>" + "(option<sp>'connectTimeout':<sp>" ) + ( java . text . NumberFormat . getInstance ( ) . format ( options . connectTimeout ) ) ) + "<sp>ms)" ) ) ; } catch ( java . lang . InterruptedException interrupted ) { throw org . mariadb . jdbc . internal . util . exceptions . ExceptionMapper . connException ( "Thread<sp>was<sp>interrupted" , interrupted ) ; } finally { pendingRequestNumber . decrementAndGet ( ) ; } } | org . junit . Assert . assertEquals ( 0 , objectNames . size ( ) ) |
payloadAsDataType ( ) { org . mule . runtime . core . internal . message . InternalMessage transformedMessage = mock ( org . mule . runtime . core . internal . message . InternalMessage . class , org . mule . runtime . core . internal . el . context . RETURNS_DEEP_STUBS ) ; org . mule . runtime . api . transformation . TransformationService transformationService = mock ( org . mule . runtime . api . transformation . TransformationService . class ) ; when ( transformedMessage . getPayload ( ) ) . thenReturn ( new org . mule . runtime . api . metadata . TypedValue < java . lang . Object > ( TEST_PAYLOAD , STRING ) ) ; muleContext . setTransformationService ( transformationService ) ; when ( transformationService . transform ( event . getMessage ( ) , DataType . STRING ) ) . thenReturn ( transformedMessage ) ; java . lang . Object result = evaluate ( ( ( "message.payloadAs(" + ( org . mule . runtime . api . metadata . DataType . class . getName ( ) ) ) + ".STRING)" ) , event ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertSame ( org . mule . runtime . core . internal . el . context . TEST_PAYLOAD , result ) |
testHasElementsOnNullValue ( ) { "<AssertPlaceHolder>" ; } hasElements ( ) { return new com . annimon . stream . test . hamcrest . DoubleStreamMatcher . HasElementsMatcher ( ) ; } | org . junit . Assert . assertThat ( null , com . annimon . stream . test . hamcrest . DoubleStreamMatcher . hasElements ( ) ) |
registerClassesWithSameRoute_class_superClass_subclassIsRegistered ( ) { java . util . LinkedHashSet < java . lang . Class < ? > > classes = new java . util . LinkedHashSet ( ) ; classes . add ( com . vaadin . flow . server . startup . RouteRegistryInitializerTest . SuperRouteTarget . class ) ; classes . add ( com . vaadin . flow . server . startup . RouteRegistryInitializerTest . BaseRouteTarget . class ) ; routeRegistryInitializer . onStartup ( classes , servletContext ) ; "<AssertPlaceHolder>" ; } getNavigationTarget ( java . lang . String ) { java . util . Objects . requireNonNull ( pathString , "pathString<sp>must<sp>not<sp>be<sp>null." ) ; return getNavigationTarget ( pathString , java . util . Collections . emptyList ( ) ) ; } | org . junit . Assert . assertEquals ( com . vaadin . flow . server . startup . RouteRegistryInitializerTest . SuperRouteTarget . class , registry . getNavigationTarget ( "foo" ) . get ( ) ) |
testSnapshotTableAsync ( ) { com . google . bigtable . admin . v2 . SnapshotTableRequest request = com . google . bigtable . admin . v2 . SnapshotTableRequest . newBuilder ( ) . setSnapshotId ( "snaphsotId" ) . setName ( com . google . cloud . bigtable . grpc . TestBigtableTableAdminClientWrapper . TABLE_NAME ) . build ( ) ; com . google . longrunning . Operation response = com . google . longrunning . Operation . getDefaultInstance ( ) ; when ( mockAdminClient . snapshotTableAsync ( request ) ) . thenReturn ( com . google . common . util . concurrent . Futures . immediateFuture ( response ) ) ; java . util . concurrent . Future < com . google . longrunning . Operation > actualResponse = clientWrapper . snapshotTableAsync ( request ) ; "<AssertPlaceHolder>" ; verify ( mockAdminClient ) . snapshotTableAsync ( request ) ; } get ( ) { if ( ( com . google . cloud . bigtable . hbase . test_env . SharedTestEnv . instance ) == null ) { com . google . cloud . bigtable . hbase . test_env . SharedTestEnv . instance = com . google . cloud . bigtable . hbase . test_env . SharedTestEnv . create ( ) ; } com . google . cloud . bigtable . hbase . test_env . SharedTestEnv . instance . retain ( ) ; return com . google . cloud . bigtable . hbase . test_env . SharedTestEnv . instance ; } | org . junit . Assert . assertEquals ( response , actualResponse . get ( ) ) |
test_SingleDirFile ( ) { de . vandermeer . svg2vector . applications . is . Svg2Vector_IS app = new de . vandermeer . svg2vector . applications . is . Svg2Vector_IS ( ) ; java . lang . String [ ] args = org . apache . commons . lang3 . ArrayUtils . addAll ( de . vandermeer . svg2vector . applications . is . Test_Svg2Vector_IS_SVG . STD_OPTIONS , "-f" , "src/test/resources/svg-files/chomsky-hierarchy.svgz" , "-d" , de . vandermeer . svg2vector . applications . is . Test_Svg2Vector_IS_SVG . OUT_DIR_PREFIX , "-o" , "chomsky1" ) ; "<AssertPlaceHolder>" ; } executeApplication ( java . lang . String [ ] ) { int ret = super . executeApplication ( args ) ; if ( ret != 0 ) { return ret ; } de . vandermeer . svg2vector . applications . base . SvgTargets target = this . getProps ( ) . getTarget ( ) ; java . lang . String fn = this . optionInkscapeExec . getValue ( ) ; if ( ( ret = this . checkIsExecutable ( fn ) ) < 0 ) { return ret ; } this . printDetailMessage ( ( "Inkscape<sp>exec:<sp>" + fn ) ) ; this . setWarnings ( target ) ; de . vandermeer . svg2vector . applications . is . IsCmd isCmd = new de . vandermeer . svg2vector . applications . is . IsCmd ( fn , target , this . getProps ( ) ) ; isCmd . appendTargetSettings ( target , this . optionExpDpi , this . optionExpPdfver , this . optionExpPslevel ) ; de . vandermeer . svg2vector . applications . is . IsCmd isTmpCmd = new de . vandermeer . svg2vector . applications . is . IsCmd ( fn , de . vandermeer . svg2vector . applications . base . SvgTargets . svg , this . getProps ( ) ) ; if ( this . optionSvgFirst . inCli ( ) ) { this . printProgressMessage ( "converting<sp>to<sp>temporary<sp>SVG<sp>first" ) ; this . printDetailMessage ( ( "Inkscape<sp>cmd<sp>tmp:<sp>" + isTmpCmd ) ) ; } else { this . printProgressMessage ( "converting<sp>directly<sp>to<sp>target" ) ; this . printDetailMessage ( ( "Inkscape<sp>cmd:<sp>" + isCmd ) ) ; } ret = this . createTempArtifacts ( isTmpCmd ) ; if ( ret < 0 ) { return ret ; } ret = this . convertInput ( isCmd , target ) ; if ( ret < 0 ) { return ret ; } this . removeTempArtifacts ( ) ; this . printProgressMessage ( "finished<sp>successfully" ) ; return 0 ; } | org . junit . Assert . assertEquals ( 0 , app . executeApplication ( args ) ) |
deveObterIcms00ComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS icms = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS ( ) ; final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS00 icms00 = com . fincatto . documentofiscal . nfe400 . FabricaDeObjetosFake . getNFNotaInfoItemImpostoICMS00 ( ) ; icms . setIcms00 ( icms00 ) ; "<AssertPlaceHolder>" ; } getIcms00 ( ) { return this . icms00 ; } | org . junit . Assert . assertEquals ( icms00 , icms . getIcms00 ( ) ) |
testUploadQuestionGroup_UploadFailureDuringValidation ( ) { when ( requestContext . getMessageContext ( ) ) . thenReturn ( messageContext ) ; org . mifos . platform . validations . ValidationException validationException = new org . mifos . platform . validations . ValidationException ( org . mifos . platform . questionnaire . QuestionnaireConstants . GENERIC_VALIDATION ) ; validationException . addChildException ( new org . mifos . platform . validations . ValidationException ( org . mifos . platform . questionnaire . QuestionnaireConstants . QUESTION_GROUP_TITLE_NOT_PROVIDED ) ) ; validationException . addChildException ( new org . mifos . platform . validations . ValidationException ( org . mifos . platform . questionnaire . QuestionnaireConstants . DUPLICATE_QUESTION_FOUND_IN_SECTION ) ) ; doThrow ( validationException ) . when ( questionnaireServiceFacade ) . uploadPPIQuestionGroup ( "INDIA" ) ; org . mifos . platform . questionnaire . ui . model . UploadQuestionGroupForm form = new org . mifos . platform . questionnaire . ui . model . UploadQuestionGroupForm ( ) ; form . setSelectedCountry ( "INDIA" ) ; java . lang . String result = controller . upload ( form , requestContext ) ; "<AssertPlaceHolder>" ; verify ( requestContext ) . getMessageContext ( ) ; verify ( messageContext ) . addMessage ( argThat ( new org . mifos . platform . matchers . MessageMatcher ( org . mifos . platform . questionnaire . QuestionnaireConstants . QUESTION_GROUP_TITLE_NOT_PROVIDED ) ) ) ; verify ( messageContext ) . addMessage ( argThat ( new org . mifos . platform . matchers . MessageMatcher ( org . mifos . platform . questionnaire . QuestionnaireConstants . DUPLICATE_QUESTION_FOUND_IN_SECTION ) ) ) ; } upload ( org . mifos . platform . questionnaire . ui . model . UploadQuestionGroupForm , org . springframework . webflow . execution . RequestContext ) { java . lang . String result = "success" ; if ( selectedCountryNotPresent ( uploadQuestionGroupForm . getSelectedCountry ( ) ) ) { constructErrorMessage ( requestContext . getMessageContext ( ) , "questionnaire.error.ppi.country" , "selectedCountry" , "Please<sp>specify<sp>the<sp>Country" ) ; result = "failure" ; } else { try { questionnaireServiceFacade . uploadPPIQuestionGroup ( uploadQuestionGroupForm . getSelectedCountry ( ) ) ; } catch ( org . mifos . platform . validations . ValidationException e ) { handleValidationException ( e , requestContext ) ; result = "failure" ; } catch ( org . mifos . framework . exceptions . SystemException e ) { constructErrorMessage ( requestContext . getMessageContext ( ) , e . getKey ( ) , "selectedCountry" , e . getKey ( ) ) ; result = "failure" ; } catch ( java . lang . Exception e ) { constructAndLogSystemError ( requestContext . getMessageContext ( ) , new org . mifos . framework . exceptions . SystemException ( e . getMessage ( ) , e ) ) ; result = "failure" ; } } return result ; } | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( "failure" ) ) |
givenJsonWhenValueIsTooBigORContainXMLTagUsingAll ( ) { final java . io . File file = fr . gouv . vitam . common . PropertiesUtils . findFile ( JSON_TEST_FILE ) ; final com . fasterxml . jackson . databind . JsonNode json = fr . gouv . vitam . common . json . JsonHandler . getFromFile ( file ) ; "<AssertPlaceHolder>" ; fr . gouv . vitam . common . security . SanityChecker . checkJsonAll ( json ) ; } getFromFile ( java . io . File ) { try { fr . gouv . vitam . common . ParametersChecker . checkParameter ( "File" , file ) ; return fr . gouv . vitam . common . json . JsonHandler . OBJECT_MAPPER . readTree ( file ) ; } catch ( java . io . IOException | java . lang . IllegalArgumentException e ) { throw new fr . gouv . vitam . common . exception . InvalidParseOperationException ( e ) ; } } | org . junit . Assert . assertNotNull ( json ) |
testGetRequestBodyFromStream ( ) { httpEntity = new org . apache . http . entity . StringEntity ( ENTITY_CONTENT , java . nio . charset . Charset . forName ( "ISO-8859-1" ) ) ; apacheRequest . setHeader ( "Content-type" , "text/plain;<sp>charset=ISO-8859-1" ) ; apacheRequest . setEntity ( httpEntity ) ; java . lang . String result = new ca . uhn . fhir . rest . client . apache . ApacheHttpRequest ( null , apacheRequest ) . getRequestBodyFromStream ( ) ; "<AssertPlaceHolder>" ; } getRequestBodyFromStream ( ) { return null ; } | org . junit . Assert . assertEquals ( ENTITY_CONTENT , result ) |
shouldChangeDirection_WhenReflectedDownToUp ( ) { com . codenjoy . dojo . pong . model . BallDirection ballDirection = new com . codenjoy . dojo . pong . model . BallDirection ( com . codenjoy . dojo . services . QDirection . DOWN ) ; com . codenjoy . dojo . pong . model . BallDirection reflectedDirection = ballDirection . reflectedFrom ( horisontalWall ) ; com . codenjoy . dojo . pong . model . BallDirection expectedDirection = new com . codenjoy . dojo . pong . model . BallDirection ( com . codenjoy . dojo . services . QDirection . UP ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) return false ; com . codenjoy . dojo . reversi . services . Events events = ( ( com . codenjoy . dojo . reversi . services . Events ) ( o ) ) ; if ( ( count ) != ( events . count ) ) return false ; return name . equals ( events . name ) ; } | org . junit . Assert . assertTrue ( expectedDirection . equals ( reflectedDirection ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.