input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testChangeIpcPort ( ) { org . apache . hadoop . hdfs . HdfsConfiguration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; org . apache . hadoop . hdfs . MiniDFSCluster cluster = null ; try { cluster = new org . apache . hadoop . hdfs . MiniDFSCluster . Builder ( conf ) . build ( ) ; java . net . InetSocketAddress addr = new java . net . InetSocketAddress ( "localhost" , cluster . getNameNodePort ( ) ) ; org . apache . hadoop . hdfs . DFSClient client = new org . apache . hadoop . hdfs . DFSClient ( addr , conf ) ; cluster . restartDataNodes ( ) ; org . apache . hadoop . hdfs . protocol . DatanodeInfo [ ] report = client . datanodeReport ( DatanodeReportType . ALL ) ; long firstUpdateAfterRestart = report [ 0 ] . getLastUpdate ( ) ; boolean gotHeartbeat = false ; for ( int i = 0 ; ( i < 10 ) && ( ! gotHeartbeat ) ; i ++ ) { try { java . lang . Thread . sleep ( ( i * 1000 ) ) ; } catch ( java . lang . InterruptedException ie ) { } report = client . datanodeReport ( DatanodeReportType . ALL ) ; gotHeartbeat = ( report [ 0 ] . getLastUpdate ( ) ) > firstUpdateAfterRestart ; } if ( ! gotHeartbeat ) { org . junit . Assert . fail ( "Never<sp>got<sp>a<sp>heartbeat<sp>from<sp>restarted<sp>datanode." ) ; } int realIpcPort = cluster . getDataNodes ( ) . get ( 0 ) . getIpcPort ( ) ; "<AssertPlaceHolder>" ; } finally { if ( cluster != null ) { cluster . shutdown ( ) ; } } } getIpcPort ( ) { return ipcPort ; }
|
org . junit . Assert . assertEquals ( realIpcPort , report [ 0 ] . getIpcPort ( ) )
|
jsonControllerShouldReceiveTraceeHeader ( ) { io . tracee . Tracee . getBackend ( ) . put ( TraceeConstants . INVOCATION_ID_KEY , "myValue" ) ; final io . tracee . binding . springmvc . itests . TraceeInterceptorRestIT . SillyRestBody sillyBody = restTemplate . getForEntity ( ( ( ENDPOINT_URL ) + "nameNeedTraceeId/sven" ) , io . tracee . binding . springmvc . itests . TraceeInterceptorRestIT . SillyRestBody . class ) . getBody ( ) ; "<AssertPlaceHolder>" ; } getReceivedTraceeId ( ) { return receivedTraceeId ; }
|
org . junit . Assert . assertThat ( sillyBody . getReceivedTraceeId ( ) , org . hamcrest . Matchers . is ( "myValue" ) )
|
test_Error_Target ( ) { de . vandermeer . svg2vector . applications . base . AppBase < de . vandermeer . svg2vector . applications . is . IsLoader , de . vandermeer . svg2vector . applications . base . AppProperties < de . vandermeer . svg2vector . applications . is . IsLoader > > testApp = new de . vandermeer . svg2vector . applications . base . AppBase < de . vandermeer . svg2vector . applications . is . IsLoader , de . vandermeer . svg2vector . applications . base . AppProperties < de . vandermeer . svg2vector . applications . is . IsLoader > > ( new de . vandermeer . svg2vector . applications . base . AppProperties < de . vandermeer . svg2vector . applications . is . IsLoader > ( new de . vandermeer . svg2vector . applications . base . SvgTargets [ ] { SvgTargets . pdf } , new de . vandermeer . svg2vector . applications . is . IsLoader ( ) ) ) { @ de . vandermeer . svg2vector . applications . base . Override public java . lang . String getAppName ( ) { return "test-app" ; } @ de . vandermeer . svg2vector . applications . base . Override public java . lang . String getAppDescription ( ) { return "app<sp>for<sp>testing" ; } @ de . vandermeer . svg2vector . applications . base . Override public java . lang . String getAppVersion ( ) { return "0.0.0" ; } } ; java . lang . String [ ] args = new java . lang . String [ ] { "-t" , "eps" , "-f" , "testfile" , "-q" } ; "<AssertPlaceHolder>" ; } executeApplication ( java . lang . String [ ] ) { int ret = de . vandermeer . execs . ExecS_Application . super . executeApplication ( args ) ; if ( ret != 0 ) { return ret ; } this . props . setMessageMode ( ) ; de . vandermeer . svg2vector . applications . base . SvgTargets target = this . props . getTarget ( ) ; if ( target == null ) { this . printErrorMessage ( ( ( ( "creating<sp>directories<sp>for<sp>output" 0 + ( this . props . getTargetValue ( ) ) ) + "creating<sp>directories<sp>for<sp>output" 1 ) + ( new org . apache . commons . lang3 . text . StrBuilder ( ) . appendWithSeparators ( this . props . getSupportedTargetts ( ) , ",<sp>" ) ) ) ) ; return - 10 ; } java . lang . String err = null ; if ( ( err = this . props . setInput ( ) ) != null ) { this . printErrorMessage ( err ) ; return - 11 ; } this . printWarnings ( ) ; if ( ( err = this . props . setOutput ( ) ) != null ) { this . printErrorMessage ( err ) ; return - 12 ; } this . printWarnings ( ) ; if ( this . props . doesNoLayers ( ) ) { this . printProgressMessage ( "processing<sp>single<sp>output,<sp>no<sp>layers" ) ; this . printDetailMessage ( ( "target:<sp>" + ( target . name ( ) ) ) ) ; this . printDetailMessage ( ( "input<sp>fn:<sp>" + ( this . props . getFinFn ( ) ) ) ) ; this . printDetailMessage ( ( "creating<sp>directories<sp>for<sp>output" 3 + ( this . props . getFoutFn ( ) ) ) ) ; } else if ( props . doesLayers ( ) ) { this . printProgressMessage ( "processing<sp>multi<sp>layer,<sp>multi<sp>file<sp>output" ) ; this . printDetailMessage ( ( "target:<sp>" + ( target . name ( ) ) ) ) ; this . printDetailMessage ( ( "input<sp>fn:<sp>" + ( this . props . getFinFn ( ) ) ) ) ; this . printDetailMessage ( ( "output<sp>dir:<sp>" + ( this . props . getDout ( ) ) ) ) ; this . printDetailMessage ( ( "fn<sp>pattern:<sp>" + ( this . props . getFoutPattern ( ) ) ) ) ; } else { this . printErrorMessage ( "creating<sp>directories<sp>for<sp>output" 2 ) ; return - 13 ; } if ( this . props . doesCreateDirectories ( ) ) { this . printProgressMessage ( "creating<sp>directories<sp>for<sp>output" ) ; if ( ( this . props . getFoutFile ( ) ) != null ) { if ( this . props . canWriteFiles ( ) ) { this . props . getFoutFile ( ) . getParentFile ( ) . mkdirs ( ) ; } this . printDetailMessage ( ( "create<sp>directories<sp>(fout):<sp>" + ( this . props . getFoutFile ( ) . getParent ( ) ) ) ) ; } if ( ( this . props . getDoutFile ( ) ) != null ) { if ( this . props . canWriteFiles ( ) ) { this . props . getDoutFile ( ) . mkdirs ( ) ; } this . printDetailMessage ( ( "create<sp>directories<sp>(dout):<sp>" + ( this . props . getDout ( ) ) ) ) ; } } return 0 ; }
|
org . junit . Assert . assertEquals ( ( - 10 ) , testApp . executeApplication ( args ) )
|
setsGenreOnV1TagOnly ( ) { com . mpatric . mp3agic . ID3v1 id3v1Tag = new com . mpatric . mp3agic . ID3WrapperTest . ID3v1TagForTesting ( ) ; com . mpatric . mp3agic . ID3Wrapper wrapper = new com . mpatric . mp3agic . ID3Wrapper ( id3v1Tag , null ) ; wrapper . setGenre ( 22 ) ; "<AssertPlaceHolder>" ; } getGenre ( ) { if ( ( ( id3v2Tag ) != null ) && ( ( id3v2Tag . getGenre ( ) ) != ( - 1 ) ) ) { return id3v2Tag . getGenre ( ) ; } else if ( ( id3v1Tag ) != null ) { return id3v1Tag . getGenre ( ) ; } else { return - 1 ; } }
|
org . junit . Assert . assertEquals ( 22 , id3v1Tag . getGenre ( ) )
|
notNullArg ( ) { org . pdfsam . ui . module . ModuleOwnedButton victim = new org . pdfsam . ui . module . ModuleOwnedButton ( "Chuck" ) ; "<AssertPlaceHolder>" ; } getOwnerModule ( ) { return ownerModule ; }
|
org . junit . Assert . assertEquals ( "Chuck" , victim . getOwnerModule ( ) )
|
testAttrsMultipleVaryMessageBytes ( ) { com . cloudera . flume . core . Event e1 ; com . cloudera . flume . core . Event e2 ; for ( com . cloudera . flume . core . EventSource src : BenchmarkHarness . varyNumAttrs . values ( ) ) { src . open ( ) ; e1 = src . next ( ) ; src . open ( ) ; e2 = src . next ( ) ; "<AssertPlaceHolder>" ; } } getBody ( ) { return evt . getRenderedMessage ( ) . getBytes ( ) ; }
|
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( e1 . getBody ( ) , e2 . getBody ( ) ) )
|
testIndexOf ( ) { org . eclipse . nebula . widgets . grid . GridItem [ ] items = org . eclipse . nebula . widgets . grid . GridTestUtil . createGridItems ( grid , 1 , 10 ) ; "<AssertPlaceHolder>" ; } createGridItems ( org . eclipse . nebula . widgets . grid . Grid , int , int ) { org . eclipse . nebula . widgets . grid . GridItem [ ] result = new org . eclipse . nebula . widgets . grid . GridItem [ rootItems * ( childItems + 1 ) ] ; int counter = 0 ; for ( int i = 0 ; i < rootItems ; i ++ ) { org . eclipse . nebula . widgets . grid . GridItem rootItem = new org . eclipse . nebula . widgets . grid . GridItem ( grid , org . eclipse . swt . SWT . NONE ) ; rootItem . setText ( ( "root_" + i ) ) ; result [ counter ] = rootItem ; counter ++ ; for ( int j = 0 ; j < childItems ; j ++ ) { org . eclipse . nebula . widgets . grid . GridItem childItem = new org . eclipse . nebula . widgets . grid . GridItem ( rootItem , org . eclipse . swt . SWT . NONE ) ; childItem . setText ( ( ( ( "root_" + i ) + "_child_" ) + j ) ) ; result [ counter ] = childItem ; counter ++ ; } } return result ; }
|
org . junit . Assert . assertEquals ( 5 , items [ 0 ] . indexOf ( items [ 6 ] ) )
|
testAllFail ( ) { final com . codahale . metrics . health . HealthCheckRegistry registry = new com . codahale . metrics . health . HealthCheckRegistry ( ) ; registry . register ( "fail1" , com . spotify . helios . master . metrics . TotalHealthCheckGaugeTest . stubHealthCheck ( HealthCheck . Result . unhealthy ( "error" ) ) ) ; registry . register ( "fail2" , com . spotify . helios . master . metrics . TotalHealthCheckGaugeTest . stubHealthCheck ( HealthCheck . Result . unhealthy ( "error" ) ) ) ; final com . spotify . helios . master . metrics . TotalHealthCheckGauge gauge = new com . spotify . helios . master . metrics . TotalHealthCheckGauge ( registry ) ; "<AssertPlaceHolder>" ; } getValue ( ) { final com . codahale . metrics . health . HealthCheck . Result result = registry . runHealthCheck ( name ) ; return result . isHealthy ( ) ? 1 : 0 ; }
|
org . junit . Assert . assertThat ( gauge . getValue ( ) , org . hamcrest . Matchers . is ( 0 ) )
|
testCreateWithByteReturnsInteger ( ) { final org . jsoar . kernel . symbols . Symbol s = org . jsoar . kernel . symbols . Symbols . create ( syms , ( ( byte ) ( 34 ) ) ) ; "<AssertPlaceHolder>" ; } asInteger ( ) { return null ; }
|
org . junit . Assert . assertEquals ( 34 , s . asInteger ( ) . getValue ( ) )
|
testShouldBeAbleToFindMultipleElementsById ( ) { driver . get ( pages . nestedPage ) ; java . util . List < org . openqa . selenium . WebElement > elements = driver . findElements ( org . openqa . selenium . By . id ( "2" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { java . lang . Object response = executeMethod . execute ( DriverCommand . GET_LOCAL_STORAGE_SIZE , null ) ; return java . lang . Integer . parseInt ( response . toString ( ) ) ; }
|
org . junit . Assert . assertThat ( elements . size ( ) , org . hamcrest . Matchers . is ( 8 ) )
|
testHashCodeWithDifferentCap ( ) { org . eclipse . swt . graphics . LineAttributes attributes1 = new org . eclipse . swt . graphics . LineAttributes ( 1 , org . eclipse . swt . SWT . CAP_FLAT , org . eclipse . swt . SWT . JOIN_BEVEL ) ; org . eclipse . swt . graphics . LineAttributes attributes2 = new org . eclipse . swt . graphics . LineAttributes ( 1 , org . eclipse . swt . SWT . CAP_ROUND , org . eclipse . swt . SWT . JOIN_BEVEL ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( requestor ) == null ? 0 : requestor . hashCode ( ) ) ; result = ( prime * result ) + ( ( topic ) == null ? 0 : topic . hashCode ( ) ) ; return result ; }
|
org . junit . Assert . assertTrue ( ( ( attributes1 . hashCode ( ) ) != ( attributes2 . hashCode ( ) ) ) )
|
whenCreatedFromMapWithoutJavaLoggingLevel_hasEmptyString ( ) { oracle . kubernetes . operator . helm . HelmOperatorValues values = new oracle . kubernetes . operator . helm . HelmOperatorValues ( com . google . common . collect . ImmutableMap . of ( ) ) ; "<AssertPlaceHolder>" ; } getJavaLoggingLevel ( ) { return javaLoggingLevel ; }
|
org . junit . Assert . assertThat ( values . getJavaLoggingLevel ( ) , org . hamcrest . Matchers . equalTo ( "" ) )
|
readJSONReturnsNullForNullInput ( ) { "<AssertPlaceHolder>" ; } readJSON ( org . json . JSONObject ) { return null ; }
|
org . junit . Assert . assertNull ( this . component . readJSON ( null ) )
|
testGetGenericSuperType1 ( ) { java . lang . String msg ; msg = "The<sp>adaptation<sp>of<sp>UML2DataType.getGenericSuperType()<sp>seems<sp>to<sp>be<sp>wrong." ; msg += "<sp>The<sp>Type<sp>" + ( org . dresdenocl . metamodels . uml2 . test . tests . TestUmlDataType . dataType . getQualifiedName ( ) ) ; msg += "<sp>should<sp>not<sp>have<sp>Generic<sp>Super<sp>Types." ; "<AssertPlaceHolder>" ; } getGenericSuperType ( ) { if ( ( genericSuperType ) == null ) { genericSuperType = new org . eclipse . emf . ecore . util . EObjectContainmentEList < org . dresdenocl . pivotmodel . GenericType > ( org . dresdenocl . pivotmodel . GenericType . class , this , org . dresdenocl . pivotmodel . PivotModelPackage . TYPE__GENERIC_SUPER_TYPE ) ; } return genericSuperType ; }
|
org . junit . Assert . assertEquals ( msg , 0 , org . dresdenocl . metamodels . uml2 . test . tests . TestUmlDataType . dataType . getGenericSuperType ( ) . size ( ) )
|
testClone ( ) { com . gs . collections . api . map . MutableMap < java . lang . String , java . lang . String > map = this . classUnderTest ( ) ; "<AssertPlaceHolder>" ; } clone ( ) { return this ; }
|
org . junit . Assert . assertSame ( map , map . clone ( ) )
|
testNullConstraint ( ) { final org . kie . api . KieBase kbase = loadKnowledgeBase ( "null_constraint.drl" ) ; org . kie . api . runtime . KieSession session = kbase . newKieSession ( ) ; final java . util . List foo = new java . util . ArrayList ( ) ; session . setGlobal ( "messages" , foo ) ; final org . drools . compiler . PersonInterface p1 = new org . drools . compiler . Person ( null , "food" , 40 ) ; final org . drools . compiler . Primitives p2 = new org . drools . compiler . Primitives ( ) ; p2 . setArrayAttribute ( null ) ; session . insert ( p1 ) ; session . insert ( p2 ) ; session = org . drools . compiler . integrationtests . SerializationHelper . getSerialisedStatefulKnowledgeSession ( session , true ) ; session . fireAllRules ( ) ; "<AssertPlaceHolder>" ; } getGlobal ( java . lang . String ) { return null ; }
|
org . junit . Assert . assertEquals ( 2 , ( ( java . util . List ) ( session . getGlobal ( "messages" ) ) ) . size ( ) )
|
testSkipsWhenNoOnloadAndWithHintSpecified ( ) { org . easymock . EasyMock . expect ( jsUri . getOnload ( ) ) . andReturn ( null ) ; org . easymock . EasyMock . expect ( jsUri . isNohint ( ) ) . andReturn ( false ) ; response = control . createMock ( org . apache . shindig . gadgets . js . JsResponseBuilder . class ) ; control . replay ( ) ; "<AssertPlaceHolder>" ; control . verify ( ) ; } process ( org . apache . http . HttpResponse , org . apache . http . protocol . HttpContext ) { org . apache . http . HttpEntity entity = response . getEntity ( ) ; if ( entity != null ) { org . apache . http . Header ceheader = entity . getContentEncoding ( ) ; if ( ceheader != null ) { for ( org . apache . http . HeaderElement codec : ceheader . getElements ( ) ) { java . lang . String codecname = codec . getName ( ) ; if ( "gzip" . equalsIgnoreCase ( codecname ) ) { response . setEntity ( new org . apache . shindig . gadgets . http . BasicHttpFetcher . GzipDecompressingEntity ( response . getEntity ( ) ) ) ; return ; } else if ( "deflate" . equals ( codecname ) ) { response . setEntity ( new org . apache . shindig . gadgets . http . BasicHttpFetcher . DeflateDecompressingEntity ( response . getEntity ( ) ) ) ; return ; } } } } }
|
org . junit . Assert . assertTrue ( processor . process ( request , response ) )
|
testSetArrowStyleListKO ( ) { final java . util . List < net . sf . latexdraw . model . api . shape . ArrowStyle > vals = java . util . Arrays . asList ( arr1 . getArrowStyle ( 0 ) , arr2 . getArrowStyle ( 1 ) ) ; group . setArrowInsetList ( null ) ; "<AssertPlaceHolder>" ; } getArrowStyle ( java . lang . String ) { return java . util . Arrays . stream ( net . sf . latexdraw . model . api . shape . ArrowStyle . values ( ) ) . filter ( ( it ) -> ( it . getPSTToken ( ) . equals ( token ) ) || ( it . toString ( ) . equals ( token ) ) ) . findAny ( ) . orElse ( net . sf . latexdraw . model . api . shape . ArrowStyle . NONE ) ; }
|
org . junit . Assert . assertEquals ( vals , java . util . Arrays . asList ( arr1 . getArrowStyle ( 0 ) , arr2 . getArrowStyle ( 1 ) ) )
|
testOneWaySSLWithBadServerProtocol ( ) { createCustomSslServer ( null , "myBadProtocol" ) ; tc . getParams ( ) . put ( TransportConstants . SSL_ENABLED_PROP_NAME , true ) ; tc . getParams ( ) . put ( TransportConstants . TRUSTSTORE_PROVIDER_PROP_NAME , storeType ) ; tc . getParams ( ) . put ( TransportConstants . TRUSTSTORE_PATH_PROP_NAME , CLIENT_SIDE_TRUSTSTORE ) ; tc . getParams ( ) . put ( TransportConstants . TRUSTSTORE_PASSWORD_PROP_NAME , PASSWORD ) ; org . apache . activemq . artemis . api . core . client . ServerLocator locator = addServerLocator ( org . apache . activemq . artemis . api . core . client . ActiveMQClient . createServerLocatorWithoutHA ( tc ) ) ; try { createSessionFactory ( locator ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . activemq . artemis . api . core . ActiveMQNotConnectedException e ) { "<AssertPlaceHolder>" ; } } fail ( ) { try { org . junit . Assert . fail ( ) ; } catch ( java . lang . AssertionError e ) { org . apache . activemq . artemis . jms . tests . util . ProxyAssertSupport . log . warn ( ( "AssertionFailure::" + ( e . toString ( ) ) ) , e ) ; throw e ; } }
|
org . junit . Assert . assertTrue ( true )
|
getProviders_shouldReturnAllProvidersIfQueryIsEmptyAndIncludeRetiredTrue ( ) { java . util . List < org . openmrs . Provider > allProviders = service . getAllProviders ( ) ; java . util . List < org . openmrs . Provider > providers = service . getProviders ( "" , null , null , null , true ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) . size ( ) ; }
|
org . junit . Assert . assertEquals ( allProviders . size ( ) , providers . size ( ) )
|
testIllegalClosedPolygon ( ) { org . openspaces . spatial . shapes . Polygon polygonWithCloseRing = org . openspaces . spatial . ShapeFactory . polygon ( org . openspaces . spatial . ShapeFactory . point ( 75.05722045898438 , 41.14039880964587 ) , org . openspaces . spatial . ShapeFactory . point ( 73.30490112304686 , 41.15797827873605 ) , org . openspaces . spatial . ShapeFactory . point ( 75.05722045898438 , 41.14039880964587 ) ) ; org . locationtech . spatial4j . shape . Shape spatial4jPolygon = _handler . toShape ( polygonWithCloseRing ) ; "<AssertPlaceHolder>" ; } toShape ( java . lang . Object ) { if ( obj instanceof org . openspaces . spatial . spatial4j . Spatial4jShapeProvider ) return ( ( org . openspaces . spatial . spatial4j . Spatial4jShapeProvider ) ( obj ) ) . getSpatial4jShape ( _luceneConfiguration . getSpatialContext ( ) ) ; throw new java . lang . IllegalArgumentException ( ( ( "Unsupported<sp>shape<sp>[" + ( obj . getClass ( ) . getName ( ) ) ) + "]" ) ) ; }
|
org . junit . Assert . assertNotNull ( spatial4jPolygon )
|
defaultState ( ) { try { future . get ( 5 , TimeUnit . MILLISECONDS ) ; org . junit . Assert . fail ( ) ; } catch ( java . util . concurrent . TimeoutException expected ) { "<AssertPlaceHolder>" ; } } get ( long , java . util . concurrent . TimeUnit ) { long giveUp = ( java . lang . System . currentTimeMillis ( ) ) + ( unit . toMillis ( timeout ) ) ; while ( ! ( done ) ) { if ( ! ( this . isOpen ( ) ) ) { throw new java . util . concurrent . CancellationException ( ( ( "IOHub#" + ( _id ) ) + "<sp>Selector<sp>is<sp>closed" ) ) ; } long timeoutin = giveUp - ( java . lang . System . currentTimeMillis ( ) ) ; if ( timeoutin <= 0 ) { throw new java . util . concurrent . TimeoutException ( ) ; } if ( ( task ) == null ) { throw new java . util . concurrent . CancellationException ( ) ; } long remaining = java . lang . Math . min ( 30000 , ( ( delayTime ) - ( java . lang . System . currentTimeMillis ( ) ) ) ) ; wait ( java . lang . Math . min ( timeoutin , java . lang . Math . max ( 1000 , remaining ) ) ) ; } if ( ( failure ) != null ) { throw new java . util . concurrent . ExecutionException ( failure ) ; } return null ; }
|
org . junit . Assert . assertTrue ( true )
|
deleteDomainPresenceWithTimeCheck_delete_with_same_DateTime ( ) { org . joda . time . DateTime CREATION_DATETIME = org . joda . time . DateTime . now ( ) ; io . kubernetes . client . models . V1ObjectMeta domainMeta = createMetadata ( CREATION_DATETIME ) ; io . kubernetes . client . models . V1ObjectMeta domain2Meta = createMetadata ( CREATION_DATETIME ) ; "<AssertPlaceHolder>" ; } isFirstNewer ( io . kubernetes . client . models . V1ObjectMeta , io . kubernetes . client . models . V1ObjectMeta ) { if ( second == null ) return true ; if ( first == null ) return false ; org . joda . time . DateTime time1 = first . getCreationTimestamp ( ) ; org . joda . time . DateTime time2 = second . getCreationTimestamp ( ) ; if ( time1 . equals ( time2 ) ) { return ( oracle . kubernetes . operator . helpers . KubernetesUtils . getResourceVersion ( first ) ) > ( oracle . kubernetes . operator . helpers . KubernetesUtils . getResourceVersion ( second ) ) ; } else { return time1 . isAfter ( time2 ) ; } }
|
org . junit . Assert . assertFalse ( oracle . kubernetes . operator . helpers . KubernetesUtils . isFirstNewer ( domainMeta , domain2Meta ) )
|
testLotsOfBytes ( ) { int howManyBytes = 48000 ; org . skyscreamer . nevado . jms . message . BytesMessage msg = createSession ( ) . createBytesMessage ( ) ; byte [ ] data = org . skyscreamer . nevado . jms . util . RandomData . readBytes ( howManyBytes ) ; msg . writeBytes ( data ) ; org . skyscreamer . nevado . jms . message . BytesMessage msgOut = ( ( org . skyscreamer . nevado . jms . message . BytesMessage ) ( sendAndReceive ( msg ) ) ) ; byte [ ] dataOut = new byte [ howManyBytes ] ; msgOut . readBytes ( dataOut ) ; "<AssertPlaceHolder>" ; } readBytes ( byte [ ] ) { return readBytes ( value , value . length ) ; }
|
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( data , dataOut ) )
|
testSerialization ( ) { org . jfree . data . time . TimePeriodValue tpv1 = new org . jfree . data . time . TimePeriodValue ( new org . jfree . data . time . Day ( 30 , 7 , 2003 ) , 55.75 ) ; org . jfree . data . time . TimePeriodValue tpv2 = ( ( org . jfree . data . time . TimePeriodValue ) ( org . jfree . chart . TestUtils . serialised ( tpv1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( tpv1 , tpv2 )
|
test_pass_inout_long ( ) { org . omg . CORBA . IntHolder x = new org . omg . CORBA . IntHolder ( ( - 4 ) ) ; server . pass_inout_long ( x ) ; "<AssertPlaceHolder>" ; } pass_inout_long ( org . omg . CORBA . IntHolder ) { x . value = ( x . value ) + 1 ; }
|
org . junit . Assert . assertEquals ( ( - 3 ) , x . value )
|
shouldFailWebSocketConnectionWhenServerSendCloseFrameWithRsv6 ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . jmock . Expectations ( ) { { oneOf ( handler ) . sessionCreated ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionOpened ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionClosed ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; atMost ( 1 ) . of ( handler ) . exceptionCaught ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( org . hamcrest . core . AllOf . allOf ( any ( java . io . IOException . class ) , org . junit . internal . matchers . ThrowableMessageMatcher . hasMessage ( equal ( LoggingUtils . EARLY_TERMINATION_OF_IOSESSION_MESSAGE ) ) ) ) ) ; } } ) ; org . apache . mina . core . future . ConnectFuture connectFuture = connector . connect ( "ws://localhost:8080/echo" , null , handler ) ; connectFuture . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; k3po . finish ( ) ; } isConnected ( ) { return channel . isConnected ( ) ; }
|
org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) )
|
testWriteTo ( ) { final java . io . StringWriter sink = new java . io . StringWriter ( ) ; final java . io . PrintWriter writer = new java . io . PrintWriter ( sink ) ; final com . allanbank . mongodb . client . metrics . basic . BasicOperationMetricsListener metrics = new com . allanbank . mongodb . client . metrics . basic . BasicOperationMetricsListener ( ) ; metrics . writeTo ( writer ) ; "<AssertPlaceHolder>" ; metrics . close ( ) ; } toString ( ) { final java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < ( myVersion . length ) ; ++ i ) { if ( i != 0 ) { builder . append ( '.' ) ; } builder . append ( java . lang . String . valueOf ( myVersion [ i ] ) ) ; } if ( ! ( mySuffix . isEmpty ( ) ) ) { if ( ( myVersion . length ) > 0 ) { builder . append ( '-' ) ; } builder . append ( mySuffix ) ; } return builder . toString ( ) ; }
|
org . junit . Assert . assertThat ( sink . toString ( ) , org . hamcrest . Matchers . is ( "" ) )
|
testCanSingleTapOnAnAnchorAndNotReloadThePage ( ) { openWebdriverTestPage ( HtmlTestData . CLICKS_PAGE ) ; ( ( org . openqa . selenium . JavascriptExecutor ) ( driver ( ) ) ) . executeScript ( "document.latch<sp>=<sp>true" ) ; singleTapOnElement ( "anchor" ) ; java . lang . Boolean samePage = ( ( java . lang . Boolean ) ( ( ( org . openqa . selenium . JavascriptExecutor ) ( driver ( ) ) ) . executeScript ( "return<sp>document.latch" ) ) ) ; "<AssertPlaceHolder>" ; } executeScript ( java . lang . String ) { return injectJavascript ( script , new org . json . JSONArray ( ) , null ) ; }
|
org . junit . Assert . assertTrue ( samePage )
|
testLoad ( ) { org . eclipse . tycho . repository . local . LocalArtifactRepository repo = new org . eclipse . tycho . repository . local . LocalArtifactRepository ( localRepoIndices ) ; repo . save ( ) ; org . eclipse . equinox . p2 . repository . artifact . IArtifactRepository repo2 = subject . load ( baseDir . toURI ( ) , 0 , new org . eclipse . core . runtime . NullProgressMonitor ( ) ) ; "<AssertPlaceHolder>" ; } toURI ( ) { return uri ; }
|
org . junit . Assert . assertEquals ( repo , repo2 )
|
testRunBatchJobThatSucceeds ( ) { org . apache . beam . sdk . Pipeline p = org . apache . beam . sdk . Pipeline . create ( options ) ; org . apache . beam . sdk . values . PCollection < java . lang . Integer > pc = p . apply ( org . apache . beam . sdk . transforms . Create . of ( 1 , 2 , 3 ) ) ; org . apache . beam . sdk . testing . PAssert . that ( pc ) . containsInAnyOrder ( 1 , 2 , 3 ) ; org . apache . beam . runners . dataflow . DataflowPipelineJob mockJob = org . mockito . Mockito . mock ( org . apache . beam . runners . dataflow . DataflowPipelineJob . class ) ; when ( mockJob . getState ( ) ) . thenReturn ( State . DONE ) ; when ( mockJob . getProjectId ( ) ) . thenReturn ( "test-project" ) ; when ( mockJob . getJobId ( ) ) . thenReturn ( "test-job" ) ; org . apache . beam . runners . dataflow . DataflowRunner mockRunner = org . mockito . Mockito . mock ( org . apache . beam . runners . dataflow . DataflowRunner . class ) ; when ( mockRunner . run ( any ( org . apache . beam . sdk . Pipeline . class ) ) ) . thenReturn ( mockJob ) ; org . apache . beam . runners . dataflow . TestDataflowRunner runner = org . apache . beam . runners . dataflow . TestDataflowRunner . fromOptionsAndClient ( options , mockClient ) ; when ( mockClient . getJobMetrics ( anyString ( ) ) ) . thenReturn ( generateMockMetricResponse ( true , true ) ) ; "<AssertPlaceHolder>" ; } run ( org . apache . beam . model . jobmanagement . v1 . JobApi . RunJobRequest , org . apache . beam . vendor . grpc . v1p13p1 . io . grpc . stub . StreamObserver ) { org . apache . beam . runners . fnexecution . jobsubmission . InMemoryJobService . LOG . trace ( "{}<sp>{}" , org . apache . beam . model . jobmanagement . v1 . JobApi . RunJobRequest . class . getSimpleName ( ) , request ) ; java . lang . String preparationId = request . getPreparationId ( ) ; try { org . apache . beam . runners . fnexecution . jobsubmission . JobPreparation preparation = preparations . get ( preparationId ) ; if ( preparation == null ) { java . lang . String errMessage = java . lang . String . format ( "Unknown<sp>Preparation<sp>Id<sp>\"%s\"." , preparationId ) ; org . apache . beam . vendor . grpc . v1p13p1 . io . grpc . StatusException exception = Status . NOT_FOUND . withDescription ( errMessage ) . asException ( ) ; responseObserver . onError ( exception ) ; return ; } try { org . apache . beam . runners . core . construction . graph . PipelineValidator . validate ( preparation . pipeline ( ) ) ; } catch ( java . lang . Exception e ) { org . apache . beam . runners . fnexecution . jobsubmission . InMemoryJobService . LOG . warn ( "Encountered<sp>Unexpected<sp>Exception<sp>during<sp>validation" , e ) ; responseObserver . onError ( new org . apache . beam . vendor . grpc . v1p13p1 . io . grpc . StatusRuntimeException ( Status . INVALID_ARGUMENT . withCause ( e ) ) ) ; return ; } org . apache . beam . runners . fnexecution . jobsubmission . JobInvocation invocation = invoker . invoke ( preparation . pipeline ( ) , preparation . options ( ) , request . getRetrievalToken ( ) ) ; java . lang . String invocationId = invocation . getId ( ) ; invocation . addStateListener ( ( state ) -> { if ( ! ( org . apache . beam . runners . fnexecution . jobsubmission . JobInvocation . isTerminated ( state ) ) ) { return ; } java . lang . String stagingSessionToken = stagingSessionTokens . get ( preparationId ) ; stagingSessionTokens . remove ( preparationId ) ; if ( ( cleanupJobFn ) != null ) { try { cleanupJobFn . accept ( stagingSessionToken ) ; } catch ( e ) { org . apache . beam . runners . fnexecution . jobsubmission . InMemoryJobService . LOG . error ( "Failed<sp>to<sp>remove<sp>job<sp>staging<sp>directory<sp>for<sp>token<sp>{}:<sp>{}" , stagingSessionToken , org . apache . beam . runners . fnexecution . jobsubmission . e ) ; } } } ) ; invocation . start ( ) ; invocations . put ( invocationId , invocation ) ; org . apache . beam . model . jobmanagement . v1 . JobApi . RunJobResponse response = org . apache . beam . model . jobmanagement . v1 . JobApi . RunJobResponse . newBuilder ( ) . setJobId ( invocationId ) . build ( ) ; responseObserver . onNext ( response ) ; responseObserver . onCompleted ( ) ; } catch ( org . apache . beam . vendor . grpc . v1p13p1 . io . grpc . StatusRuntimeException e ) { org . apache . beam . runners . fnexecution . jobsubmission . InMemoryJobService . LOG . warn ( "Encountered<sp>Status<sp>Exception" , e ) ; responseObserver . onError ( e ) ; } catch ( java . lang . Exception e ) { java . lang . String errMessage = java . lang . String . format ( "Encountered<sp>Unexpected<sp>Exception<sp>for<sp>Preparation<sp>%s" , preparationId ) ; org . apache . beam . runners . fnexecution . jobsubmission . InMemoryJobService . LOG . error ( errMessage , e ) ; responseObserver . onError ( Status . INTERNAL . withCause ( e ) . asException ( ) ) ; } }
|
org . junit . Assert . assertEquals ( mockJob , runner . run ( p , mockRunner ) )
|
listCredentials ( ) { eu . abc4trust . abce . internal . issuer . credentialManager . CredentialStorage credStore = new eu . abc4trust . abce . internal . issuer . credentialManager . PersistentCredentialStorage ( eu . abc4trust . util . TemporaryFileFactory . createTemporaryFile ( ) ) ; eu . abc4trust . abce . internal . issuer . credentialManager . CredentialManagerImpl credMng = new eu . abc4trust . abce . internal . issuer . credentialManager . CredentialManagerImpl ( credStore ) ; eu . abc4trust . xml . SecretKey [ ] issuerSecretKeys = new eu . abc4trust . xml . SecretKey [ 3 ] ; issuerSecretKeys [ 0 ] = new eu . abc4trust . xml . SecretKey ( ) ; eu . abc4trust . xml . CryptoParams cryptoParams = new eu . abc4trust . xml . CryptoParams ( ) ; cryptoParams . getContent ( ) . add ( "TestString1" ) ; issuerSecretKeys [ 0 ] . setCryptoParams ( cryptoParams ) ; issuerSecretKeys [ 1 ] = new eu . abc4trust . xml . SecretKey ( ) ; cryptoParams = new eu . abc4trust . xml . CryptoParams ( ) ; cryptoParams . getContent ( ) . add ( "TestString2" ) ; issuerSecretKeys [ 1 ] . setCryptoParams ( cryptoParams ) ; issuerSecretKeys [ 2 ] = new eu . abc4trust . xml . SecretKey ( ) ; cryptoParams = new eu . abc4trust . xml . CryptoParams ( ) ; cryptoParams . getContent ( ) . add ( "TestString2" ) ; issuerSecretKeys [ 2 ] . setCryptoParams ( cryptoParams ) ; credMng . storeIssuerSecretKey ( java . net . URI . create ( "1" ) , issuerSecretKeys [ 0 ] ) ; credMng . storeIssuerSecretKey ( java . net . URI . create ( "2" ) , issuerSecretKeys [ 1 ] ) ; credMng . storeIssuerSecretKey ( java . net . URI . create ( "3" ) , issuerSecretKeys [ 2 ] ) ; java . util . List < java . net . URI > storedURIs = credMng . listIssuerSecretKeys ( ) ; for ( int inx = 0 ; inx < ( issuerSecretKeys . length ) ; inx ++ ) { eu . abc4trust . xml . SecretKey issuerSecretKey = credMng . getIssuerSecretKey ( storedURIs . get ( inx ) ) ; "<AssertPlaceHolder>" ; } } getIssuerSecretKey ( java . net . URI ) { final eu . abc4trust . xml . SecretKey ret = ( ( eu . abc4trust . xml . SecretKey ) ( eu . abc4trust . util . ByteSerializer . readFromBytes ( ps . getItem ( SimpleParamTypes . ISSUER_SECRET_KEY , issuerParamsUid ) ) ) ) ; if ( ( ret != null ) && ( ( ret . getCryptoParams ( ) ) != null ) ) { eu . abc4trust . xml . util . XmlUtils . fixNestedContent ( ret . getCryptoParams ( ) ) ; } return ret ; }
|
org . junit . Assert . assertEquals ( issuerSecretKeys [ inx ] . getCryptoParams ( ) . getContent ( ) . get ( 0 ) , issuerSecretKey . getCryptoParams ( ) . getContent ( ) . get ( 0 ) )
|
disconnectedAgain ( ) { final org . apache . rya . shell . SharedShellState state = new org . apache . rya . shell . SharedShellState ( ) ; state . disconnected ( ) ; final org . apache . rya . shell . SharedShellState . ShellState expected = org . apache . rya . shell . SharedShellState . ShellState . builder ( ) . setConnectionState ( ConnectionState . DISCONNECTED ) . build ( ) ; "<AssertPlaceHolder>" ; } getShellState ( ) { lock . lock ( ) ; try { return shellState ; } finally { lock . unlock ( ) ; } }
|
org . junit . Assert . assertEquals ( expected , state . getShellState ( ) )
|
getRevision ( ) { "<AssertPlaceHolder>" ; } getRevision ( ) { org . junit . Assert . assertTrue ( ( "Revision<sp>is<sp>not<sp>a<sp>SHA1<sp>hash:<sp>" + ( org . mycore . common . MCRCoreVersion . getRevision ( ) ) ) , org . mycore . common . MCRCoreVersion . getRevision ( ) . matches ( "[a-fA-F0-9]{40}" ) ) ; }
|
org . junit . Assert . assertTrue ( ( "Revision<sp>is<sp>not<sp>a<sp>SHA1<sp>hash:<sp>" + ( org . mycore . common . MCRCoreVersion . getRevision ( ) ) ) , org . mycore . common . MCRCoreVersion . getRevision ( ) . matches ( "[a-fA-F0-9]{40}" ) )
|
testTLSOnly ( ) { this . server = org . apache . hc . core5 . http . impl . bootstrap . ServerBootstrap . bootstrap ( ) . setSslContext ( org . apache . hc . client5 . testing . SSLTestContexts . createServerSSLContext ( ) ) . setSslSetupHandler ( new org . apache . hc . core5 . http . impl . bootstrap . SSLServerSetupHandler ( ) { @ org . apache . hc . client5 . testing . sync . Override public void initialize ( final javax . net . ssl . SSLServerSocket socket ) throws javax . net . ssl . SSLException { socket . setEnabledProtocols ( new java . lang . String [ ] { "TLSv1" } ) ; } } ) . create ( ) ; this . server . start ( ) ; final org . apache . hc . core5 . http . protocol . HttpContext context = new org . apache . hc . core5 . http . protocol . BasicHttpContext ( ) ; final org . apache . hc . client5 . http . ssl . SSLConnectionSocketFactory socketFactory = new org . apache . hc . client5 . http . ssl . SSLConnectionSocketFactory ( org . apache . hc . client5 . testing . SSLTestContexts . createClientSSLContext ( ) ) ; try ( final java . net . Socket socket = socketFactory . createSocket ( context ) ) { final java . net . InetSocketAddress remoteAddress = new java . net . InetSocketAddress ( "localhost" , this . server . getLocalPort ( ) ) ; final org . apache . hc . core5 . http . HttpHost target = new org . apache . hc . core5 . http . HttpHost ( "https" , "localhost" , this . server . getLocalPort ( ) ) ; try ( final javax . net . ssl . SSLSocket sslSocket = ( ( javax . net . ssl . SSLSocket ) ( socketFactory . connectSocket ( TimeValue . ZERO_MILLISECONDS , socket , target , remoteAddress , null , context ) ) ) ) { final javax . net . ssl . SSLSession sslsession = sslSocket . getSession ( ) ; "<AssertPlaceHolder>" ; } } } connectSocket ( org . apache . hc . core5 . util . TimeValue , java . net . Socket , org . apache . hc . core5 . http . HttpHost , java . net . InetSocketAddress , java . net . InetSocketAddress , org . apache . hc . core5 . http . protocol . HttpContext ) { final java . net . Socket sock = ( socket != null ) ? socket : createSocket ( context ) ; if ( localAddress != null ) { sock . bind ( localAddress ) ; } try { sock . connect ( remoteAddress , ( org . apache . hc . core5 . util . TimeValue . isPositive ( connectTimeout ) ? connectTimeout . toMillisIntBound ( ) : 0 ) ) ; } catch ( final java . io . IOException ex ) { org . apache . hc . core5 . io . Closer . closeQuietly ( sock ) ; throw ex ; } return sock ; }
|
org . junit . Assert . assertNotNull ( sslsession )
|
newParamConfigShouldBuildANewParamConfigWithGivenArgs ( ) { org . codegist . crest . config . ParamConfigBuilder expected = mock ( org . codegist . crest . config . ParamConfigBuilder . class ) ; when ( paramConfigBuilderFactory . newInstance ( java . lang . String . class , org . codegist . crest . interceptor . Integer . class ) ) . thenReturn ( expected ) ; org . codegist . crest . config . ParamConfigBuilder actual = toTest . newParamConfig ( java . lang . String . class , org . codegist . crest . interceptor . Integer . class ) ; "<AssertPlaceHolder>" ; } newParamConfig ( java . lang . Class , java . lang . reflect . Type ) { return paramConfigBuilderFactory . newInstance ( type , genericType ) ; }
|
org . junit . Assert . assertSame ( expected , actual )
|
shouldValidateBillRegister ( ) { errors = billService . validateBillRegister ( billRegister ) ; "<AssertPlaceHolder>" ; } size ( ) { return messages . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , errors . size ( ) )
|
createWarMvcPortlet ( ) { wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareMaven ( project . getName ( ) , com . liferay . ide . ui . module . tests . WAR_MVC_PORTLET ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningJobs ( ) ; viewAction . project . openUpdateMavenProjectDialog ( project . getName ( ) ) ; dialogAction . updateMavenProject . selectAll ( ) ; dialogAction . confirm ( ) ; jobAction . waitForUpdateMavenProject ( ) ; "<AssertPlaceHolder>" ; viewAction . project . closeAndDelete ( project . getName ( ) ) ; } visibleFileTry ( java . lang . String [ ] ) { try { return _getProjects ( ) . isVisible ( files ) ; } catch ( java . lang . Exception e ) { _getProjects ( ) . setFocus ( ) ; try { java . lang . String [ ] parents = java . util . Arrays . copyOfRange ( files , 0 , ( ( files . length ) - 1 ) ) ; _getProjects ( ) . expand ( parents ) ; _getProjects ( ) . contextMenu ( com . liferay . ide . ui . liferay . action . REFRESH , parents ) ; ide . sleep ( 2000 ) ; } catch ( java . lang . Exception e1 ) { } for ( int i = ( files . length ) - 1 ; i > 0 ; i -- ) { java . lang . String [ ] parents = java . util . Arrays . copyOfRange ( files , 0 , ( ( files . length ) - i ) ) ; org . eclipse . swtbot . swt . finder . widgets . SWTBotTreeItem parent = _getProjects ( ) . getTreeItem ( parents ) ; _getProjects ( ) . expand ( parents ) ; java . lang . String subnode = files [ ( ( files . length ) - i ) ] ; _jobAction . waitForSubnode ( parent , subnode , com . liferay . ide . ui . liferay . action . REFRESH ) ; } return _getProjects ( ) . isVisible ( files ) ; } }
|
org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) )
|
testIntersection ( ) { org . apache . druid . collections . bitmap . WrappedBitSetBitmap bitSet = new org . apache . druid . collections . bitmap . WrappedBitSetBitmap ( org . apache . druid . collections . IntSetTestUtility . createSimpleBitSet ( org . apache . druid . collections . IntSetTestUtility . getSetBits ( ) ) ) ; java . util . Set < java . lang . Integer > extraBits = com . google . common . collect . Sets . newHashSet ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) ; org . apache . druid . collections . bitmap . WrappedBitSetBitmap bitExtraSet = new org . apache . druid . collections . bitmap . WrappedBitSetBitmap ( org . apache . druid . collections . IntSetTestUtility . createSimpleBitSet ( extraBits ) ) ; java . util . Set < java . lang . Integer > intersection = com . google . common . collect . Sets . intersection ( extraBits , org . apache . druid . collections . IntSetTestUtility . getSetBits ( ) ) ; "<AssertPlaceHolder>" ; } equalSets ( java . util . Set , org . apache . druid . collections . bitmap . ImmutableBitmap ) { java . util . Set < java . lang . Integer > s3 = new java . util . HashSet ( ) ; for ( java . lang . Integer i : new org . apache . druid . collections . IntSetTestUtility . IntIt ( s2 . iterator ( ) ) ) { s3 . add ( i ) ; } return com . google . common . collect . Sets . difference ( s1 , s3 ) . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( org . apache . druid . collections . IntSetTestUtility . equalSets ( intersection , ( ( org . apache . druid . collections . bitmap . WrappedBitSetBitmap ) ( bitSet . intersection ( bitExtraSet ) ) ) ) )
|
testRequestMethodConverter ( ) { ch . qos . logback . access . pattern . RequestMethodConverter converter = new ch . qos . logback . access . pattern . RequestMethodConverter ( ) ; converter . start ( ) ; java . lang . String result = converter . convert ( event ) ; "<AssertPlaceHolder>" ; } getMethod ( ) { if ( ( method ) == null ) { if ( ( httpRequest ) != null ) { method = httpRequest . getMethod ( ) ; } else { method = NA ; } } return method ; }
|
org . junit . Assert . assertEquals ( request . getMethod ( ) , result )
|
testExists ( ) { lineData . put ( "key" , "test" ) ; "<AssertPlaceHolder>" ; } hasValue ( java . lang . String ) { return map . containsKey ( key ) ; }
|
org . junit . Assert . assertTrue ( lineData . hasValue ( "key" ) )
|
testLineNumberCorrectInException2 ( ) { java . lang . String script = "assign(@a,<sp>array(1,<sp>2))\n" + ( "\n" + "assign(@d,<sp>@a[@b])\n" ) ; try { SRun ( script , fakePlayer ) ; } catch ( com . laytonsmith . core . exceptions . ConfigRuntimeException e ) { "<AssertPlaceHolder>" ; } } getTarget ( ) { return com . laytonsmith . abstraction . bukkit . BukkitConvertor . BukkitGetCorrectEntity ( pie . getTarget ( ) ) ; }
|
org . junit . Assert . assertEquals ( 3 , e . getTarget ( ) . line ( ) )
|
testDeleteAgentWithRights ( ) { net . maritimecloud . identityregistry . model . database . Agent agent = new net . maritimecloud . identityregistry . model . database . Agent ( ) ; agent . setIdOnBehalfOfOrganization ( 1L ) ; agent . setIdActingOrganization ( 2L ) ; net . maritimecloud . identityregistry . model . database . Organization organization = mock ( net . maritimecloud . identityregistry . model . database . Organization . class ) ; given ( this . organizationService . getOrganizationByMrn ( "urn:mrn:mcp:org:dma" ) ) . willReturn ( organization ) ; given ( this . agentService . getById ( 3L ) ) . willReturn ( agent ) ; given ( organization . getId ( ) ) . willReturn ( 1L ) ; org . springframework . security . core . Authentication auth = net . maritimecloud . identityregistry . controllers . TokenGenerator . generateKeycloakToken ( "urn:mrn:mcp:org:dma" , "ROLE_ORG_ADMIN" , "" ) ; try { mvc . perform ( delete ( "/oidc/api/org/urn:mrn:mcp:org:dma/agent/3" ) . with ( authentication ( auth ) ) . header ( "Origin" , "bla" ) ) . andExpect ( status ( ) . isOk ( ) ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } } delete ( java . lang . Long ) { repository . deleteById ( id ) ; }
|
org . junit . Assert . assertTrue ( false )
|
positional_should_export_dot ( ) { java . io . File output = new java . io . File ( super . testFolder . getRoot ( ) , "chr12-244000.vcf" ) ; setReference ( au . edu . wehi . idsv . Hg19Tests . findHg19Reference ( "chr12.fa" ) ) ; createInput ( new java . io . File ( "src/test/resources/chr12-244000.tagged.bam" ) ) ; picard . sam . BuildBamIndex bbi = new picard . sam . BuildBamIndex ( ) ; bbi . instanceMain ( new java . lang . String [ ] { "I=" + ( input . getAbsolutePath ( ) ) } ) ; au . edu . wehi . idsv . ProcessingContext pc = getCommandlineContext ( ) ; au . edu . wehi . idsv . SAMEvidenceSource ses = new au . edu . wehi . idsv . SAMEvidenceSource ( pc , input , null , 0 ) ; au . edu . wehi . idsv . util . FileHelper . copy ( ses . getFile ( ) , ses . getSVFile ( ) , true ) ; au . edu . wehi . idsv . AssemblyEvidenceSource aes = new au . edu . wehi . idsv . AssemblyEvidenceSource ( pc , com . google . common . collect . ImmutableList . of ( ses ) , output ) ; aes . assembleBreakends ( null ) ; java . io . File dir = new java . io . File ( super . testFolder . getRoot ( ) , "visualisation" ) ; java . io . File [ ] export = dir . listFiles ( ( ( java . io . FileFilter ) ( new org . apache . commons . io . filefilter . WildcardFileFilter ( "*.dot" ) ) ) ) ; "<AssertPlaceHolder>" ; } assembleBreakends ( java . util . concurrent . ExecutorService ) { source . stream ( ) . forEach ( ( ses ) -> ses . assertPreprocessingComplete ( ) ) ; if ( threadpool == null ) { threadpool = com . google . common . util . concurrent . MoreExecutors . newDirectExecutorService ( ) ; } invalidateSummaryCache ( ) ; if ( getContext ( ) . getConfig ( ) . getVisualisation ( ) . assemblyTelemetry ) { telemetry = new au . edu . wehi . idsv . visualisation . AssemblyTelemetry ( getContext ( ) . getFileSystemContext ( ) . getAssemblyTelemetry ( getFile ( ) ) , getContext ( ) . getDictionary ( ) ) ; } java . util . List < htsjdk . samtools . QueryInterval [ ] > chunks = getContext ( ) . getReference ( ) . getIntervals ( getContext ( ) . getConfig ( ) . chunkSize , getContext ( ) . getConfig ( ) . chunkSequenceChangePenalty ) ; java . util . List < java . io . File > assembledChunk = new java . util . ArrayList ( ) ; java . util . List < java . util . concurrent . Future < java . lang . Void > > tasks = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < ( chunks . size ( ) ) ; i ++ ) { htsjdk . samtools . QueryInterval [ ] chunk = chunks . get ( i ) ; java . io . File f = getContext ( ) . getFileSystemContext ( ) . getAssemblyChunkBam ( getFile ( ) , i ) ; int chunkNumber = i ; assembledChunk . add ( f ) ; if ( ! ( f . exists ( ) ) ) { tasks . add ( threadpool . submit ( ( ) -> { assembleChunk ( f , chunkNumber , chunk ) ; return null ; } ) ) ; } } runTasks ( tasks ) ; if ( ( telemetry ) != null ) { telemetry . close ( ) ; telemetry = null ; } au . edu . wehi . idsv . AssemblyEvidenceSource . log . info ( "Breakend<sp>assembly<sp>complete." ) ; java . util . List < java . io . File > deduplicatedChunks = assembledChunk ; long secondaryNotSplit = source . stream ( ) . mapToLong ( ( ses ) -> ses . getMetrics ( ) . getIdsvMetrics ( ) . SECONDARY_NOT_SPLIT ) . sum ( ) ; if ( secondaryNotSplit > 0 ) { au . edu . wehi . idsv . AssemblyEvidenceSource . log . warn ( java . lang . String . format ( "Found<sp>%d<sp>secondary<sp>alignments<sp>that<sp>were<sp>not<sp>split<sp>read<sp>alignments.<sp>GRIDSS<sp>no<sp>longer<sp>supports<sp>multi-mapping<sp>alignment.<sp>These<sp>reads<sp>will<sp>be<sp>ignored." , secondaryNotSplit ) ) ; } au . edu . wehi . idsv . AssemblyEvidenceSource . log . info ( "Merging<sp>assembly<sp>files" ) ; java . io . File out = getFile ( ) ; java . io . File tmpout = ( gridss . Defaults . OUTPUT_TO_TEMP_FILE ) ? au . edu . wehi . idsv . FileSystemContext . getWorkingFileFor ( getFile ( ) ) : out ; picard . sam . GatherBamFiles gather = new picard . sam . GatherBamFiles ( ) ; java . util . List < java . lang . String > args = new java . util . ArrayList ( ) ; for ( java . io . File f : deduplicatedChunks ) { args . add ( ( "INPUT=" + ( f . getPath ( ) ) ) ) ; } args . add ( ( "OUTPUT=" + ( tmpout . getPath ( ) ) ) ) ; if ( ( getContext ( ) . getCommandLineProgram ( ) ) != null ) { args . addAll ( gridss . cmdline . CommandLineProgramHelper . getCommonArgs ( getContext ( ) . getCommandLineProgram ( ) ) ) ; } int returnCode = gather . instanceMain ( args . toArray ( new java . lang . String [ ] { } ) ) ; if ( returnCode != 0 ) { java . lang . String msg = java . lang . String . format ( "Error<sp>executing<sp>GatherBamFiles.<sp>GatherBamFiles<sp>returned<sp>status<sp>code<sp>%d" , returnCode ) ; au . edu . wehi . idsv . AssemblyEvidenceSource
|
org . junit . Assert . assertTrue ( ( ( export != null ) && ( ( export . length ) > 0 ) ) )
|
testCardinality2 ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( ( "options<sp>{output=AST;}\n" + "a" 1 ) + "a" 0 ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "INT<sp>:<sp>\'0\'..\'9\'+;\n" ) + "WS<sp>:<sp>(\'<sp>\'|\'\\n\')<sp>{$channel=HIDDEN;}<sp>;\n" ) ; execParser ( "a" 2 , grammar , "TParser" , "TLexer" , "a" , "a<sp>b" , debug ) ; java . lang . String expecting = "org.antlr.runtime.tree.RewriteCardinalityException:<sp>token<sp>ID" ; java . lang . String found = getFirstLineOfException ( ) ; "<AssertPlaceHolder>" ; } getFirstLineOfException ( ) { if ( ( this . stderrDuringParse ) == null ) { return null ; } java . lang . String [ ] lines = this . stderrDuringParse . split ( "\n" ) ; java . lang . String prefix = "Exception<sp>in<sp>thread<sp>\"main\"<sp>" ; return lines [ 0 ] . substring ( prefix . length ( ) , lines [ 0 ] . length ( ) ) ; }
|
org . junit . Assert . assertEquals ( expecting , found )
|
testGroupingFunctionInExpression ( ) { java . lang . String sqlText = format ( ( "----------------------------\n" 2 + "group<sp>by<sp>rollup(a1,b1)<sp>order<sp>by<sp>1,2,4,5" ) , this . useSparkString ) ; java . sql . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "----------------------------\n" 1 + ( ( ( ( ( ( ( ( ( ( ( "----------------------------\n" + "<sp>1<sp>|<sp>1<sp>|<sp>6<sp>|<sp>0<sp>|<sp>0<sp>|<sp>0<sp>|\n" ) + "<sp>1<sp>|<sp>2<sp>|<sp>6<sp>|<sp>0<sp>|<sp>0<sp>|<sp>0<sp>|\n" ) + "<sp>1<sp>|NULL<sp>|<sp>6<sp>|<sp>0<sp>|<sp>0<sp>|<sp>0<sp>|\n" ) + "<sp>1<sp>|NULL<sp>|18<sp>|<sp>0<sp>|<sp>1<sp>|<sp>1<sp>|\n" ) + "<sp>2<sp>|<sp>1<sp>|<sp>6<sp>|<sp>0<sp>|<sp>0<sp>|<sp>0<sp>|\n" ) + "----------------------------\n" 5 ) + "----------------------------\n" 3 ) + "----------------------------\n" 4 ) + "<sp>3<sp>|<sp>2<sp>|<sp>6<sp>|<sp>0<sp>|<sp>0<sp>|<sp>0<sp>|\n" ) + "----------------------------\n" 0 ) + "NULL<sp>|NULL<sp>|42<sp>|<sp>1<sp>|<sp>1<sp>|<sp>2<sp>|" ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
|
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
|
testAction ( ) { when ( canvasLayoutUtils . getNext ( eq ( canvasHandler ) , eq ( element ) , eq ( targetNode ) ) ) . thenReturn ( new org . kie . workbench . common . stunner . core . graph . content . view . Point2D ( 100.0 , 500.0 ) ) ; final org . kie . workbench . common . stunner . core . client . shape . view . event . MouseClickEvent event = mock ( org . kie . workbench . common . stunner . core . client . shape . view . event . MouseClickEvent . class ) ; when ( event . getX ( ) ) . thenReturn ( 100.0 ) ; when ( event . getY ( ) ) . thenReturn ( 500.0 ) ; org . kie . workbench . common . stunner . core . client . components . toolbox . actions . ToolboxAction < org . kie . workbench . common . stunner . core . client . canvas . AbstractCanvasHandler > cascade = tested . onMouseClick ( canvasHandler , org . kie . workbench . common . stunner . core . client . components . toolbox . actions . CreateNodeToolboxActionTest . NODE_UUID , event ) ; "<AssertPlaceHolder>" ; verify ( action ) . executeAction ( canvasHandler , org . kie . workbench . common . stunner . core . client . components . toolbox . actions . CreateNodeToolboxActionTest . NODE_UUID , org . kie . workbench . common . stunner . core . client . components . toolbox . actions . CreateNodeToolboxActionTest . TARGET_NODE_ID , org . kie . workbench . common . stunner . core . client . components . toolbox . actions . CreateNodeToolboxActionTest . EDGE_ID ) ; } onMouseClick ( org . kie . workbench . common . stunner . core . client . canvas . AbstractCanvasHandler , java . lang . String , org . kie . workbench . common . stunner . core . client . shape . view . event . MouseClickEvent ) { final org . kie . workbench . common . stunner . core . graph . Node < org . kie . workbench . common . stunner . core . graph . content . view . View < ? extends org . kie . workbench . common . dmn . api . definition . v1_1 . BusinessKnowledgeModel > , org . kie . workbench . common . stunner . core . graph . Edge > bkmNode = ( ( org . kie . workbench . common . stunner . core . graph . Node < org . kie . workbench . common . stunner . core . graph . content . view . View < ? extends org . kie . workbench . common . dmn . api . definition . v1_1 . BusinessKnowledgeModel > , org . kie . workbench . common . stunner . core . graph . Edge > ) ( org . kie . workbench . common . stunner . core . client . canvas . util . CanvasLayoutUtils . getElement ( canvasHandler , uuid ) . asNode ( ) ) ) ; final org . kie . workbench . common . dmn . api . definition . v1_1 . BusinessKnowledgeModel bkm = bkmNode . getContent ( ) . getDefinition ( ) ; final boolean isOnlyVisualChangeAllowed = false ; editExpressionEvent . fire ( new org . kie . workbench . common . dmn . client . events . EditExpressionEvent ( sessionManager . getCurrentSession ( ) , uuid , bkm . asHasExpression ( ) , java . util . Optional . of ( bkm ) , isOnlyVisualChangeAllowed ) ) ; return this ; }
|
org . junit . Assert . assertEquals ( tested , cascade )
|
testEof ( ) { org . nucleus8583 . core . charset . spi . AsciiDecoder decoder = new org . nucleus8583 . core . charset . spi . AsciiDecoder ( new java . io . ByteArrayInputStream ( new byte [ 0 ] ) ) ; "<AssertPlaceHolder>" ; } read ( ) { if ( ( remaining ) <= 0 ) { return - 1 ; } char cc = value . charAt ( readIndex ) ; ++ ( readIndex ) ; -- ( remaining ) ; return cc ; }
|
org . junit . Assert . assertEquals ( ( - 1 ) , decoder . read ( ) )
|
quote_body_lf_allow ( ) { java . lang . String [ ] [ ] result = read ( "\'\n\'" ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { com . asakusafw . dmdl . java . util . JavaName jn = com . asakusafw . dmdl . java . util . JavaName . of ( new com . asakusafw . dmdl . model . AstSimpleName ( null , name ) ) ; jn . addFirst ( "is" ) ; java . lang . Object result = invoke ( jn . toMemberName ( ) ) ; return ( ( java . lang . Boolean ) ( result ) ) ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( new java . lang . String [ ] [ ] { new java . lang . String [ ] { "\n" } } ) )
|
copyFromLocalWildcardNotDir ( ) { java . lang . String localTestDir = alluxio . client . cli . fs . FileSystemShellUtilsTest . resetFileHierarchy ( mFileSystem ) ; java . lang . String alluxioTestDir = alluxio . client . cli . fs . FileSystemShellUtilsTest . resetFileHierarchy ( mFileSystem ) ; int ret = mFsShell . run ( "cp" , ( ( "file://" + localTestDir ) + "/*/foo*" ) , ( alluxioTestDir + "/foobar4" ) ) ; "<AssertPlaceHolder>" ; } run ( alluxio . job . JobConfig , int , alluxio . conf . AlluxioConfiguration ) { alluxio . retry . CountingRetry retryPolicy = new alluxio . retry . CountingRetry ( attempts ) ; while ( retryPolicy . attempt ( ) ) { long jobId ; try ( alluxio . client . job . JobMasterClient client = JobMasterClient . Factory . create ( alluxio . worker . job . JobMasterClientContext . newBuilder ( alluxio . ClientContext . create ( alluxioConf ) ) . build ( ) ) ) { jobId = client . run ( config ) ; } catch ( java . lang . Exception e ) { alluxio . client . job . JobGrpcClientUtils . LOG . warn ( "Exception<sp>encountered<sp>when<sp>starting<sp>a<sp>job." , e ) ; continue ; } alluxio . job . wire . JobInfo jobInfo = alluxio . client . job . JobGrpcClientUtils . waitFor ( jobId , alluxioConf ) ; if ( jobInfo == null ) { break ; } if ( ( ( jobInfo . getStatus ( ) ) == ( alluxio . job . wire . Status . COMPLETED ) ) || ( ( jobInfo . getStatus ( ) ) == ( alluxio . job . wire . Status . CANCELED ) ) ) { return ; } alluxio . client . job . JobGrpcClientUtils . LOG . warn ( "Job<sp>{}<sp>failed<sp>to<sp>complete:<sp>{}" , jobId , jobInfo . getErrorMessage ( ) ) ; } throw new java . lang . RuntimeException ( "Failed<sp>to<sp>successfully<sp>complete<sp>the<sp>job." ) ; }
|
org . junit . Assert . assertEquals ( ( - 1 ) , ret )
|
testHashCode ( ) { org . jfree . data . function . LineFunction2D f1 = new org . jfree . data . function . LineFunction2D ( 1.0 , 2.0 ) ; org . jfree . data . function . LineFunction2D f2 = new org . jfree . data . function . LineFunction2D ( 1.0 , 2.0 ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { int result ; result = ( ( this . data ) != null ) ? this . data . hashCode ( ) : 0 ; result = ( 29 * result ) + ( ( this . xPoints ) != null ? this . xPoints . hashCode ( ) : 0 ) ; result = ( 29 * result ) + ( this . propagateEvents ? 1 : 0 ) ; result = ( 29 * result ) + ( this . autoPrune ? 1 : 0 ) ; return result ; }
|
org . junit . Assert . assertEquals ( f1 . hashCode ( ) , f2 . hashCode ( ) )
|
testDelimiter ( ) { io . cdap . cdap . format . DelimitedStringsRecordFormat format = new io . cdap . cdap . format . DelimitedStringsRecordFormat ( ) ; io . cdap . cdap . api . data . format . FormatSpecification spec = new io . cdap . cdap . api . data . format . FormatSpecification ( io . cdap . cdap . format . DelimitedStringsRecordFormat . class . getCanonicalName ( ) , null , com . google . common . collect . ImmutableMap . of ( DelimitedStringsRecordFormat . DELIMITER , "<sp>" ) ) ; format . initialize ( spec ) ; java . lang . String body = "userX<sp>actionY<sp>itemZ" ; io . cdap . cdap . api . data . format . StructuredRecord output = format . read ( java . nio . ByteBuffer . wrap ( io . cdap . cdap . api . common . Bytes . toBytes ( body ) ) ) ; java . lang . String [ ] actual = output . get ( "body" ) ; java . lang . String [ ] expected = body . split ( "<sp>" ) ; "<AssertPlaceHolder>" ; } get ( byte [ ] ) { return table . read ( key ) ; }
|
org . junit . Assert . assertArrayEquals ( expected , actual )
|
test_tuscanyGetSetAttribute ( ) { try { org . apache . tuscany . sca . test . corba . types . TScenarioTwo ref = org . apache . tuscany . sca . test . corba . ScenarioTwoTestCase . node . getService ( org . apache . tuscany . sca . test . corba . types . TScenarioTwoComponent . class , "ScenarioTwo" ) . getScenarioTwo ( ) ; java . lang . String strVal = "Whatever" ; ref . setStringField ( strVal ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( ) ; } } getStringField ( ) { return org . apache . tuscany . sca . test . corba . types . TScenarioTwoServant . stringField ; }
|
org . junit . Assert . assertEquals ( strVal , ref . getStringField ( ) )
|
testFetchSuccessWithDifferentSyncIDMergesDeclined ( ) { session . config . syncID = "NOT<sp>TEST<sp>SYNC<sp>ID" ; session . config . declinedEngineNames = new java . util . HashSet < java . lang . String > ( ) ; session . config . declinedEngineNames . add ( "baznoo" ) ; org . mozilla . gecko . sync . MetaGlobal mg = new org . mozilla . gecko . sync . MetaGlobal ( null , null ) ; mg . setSyncID ( org . mozilla . gecko . sync . stage . test . TestFetchMetaGlobalStage . TEST_SYNC_ID ) ; mg . setStorageVersion ( java . lang . Long . valueOf ( org . mozilla . gecko . sync . stage . test . TestFetchMetaGlobalStage . TEST_STORAGE_VERSION ) ) ; final org . json . simple . JSONArray testingDeclinedEngines = makeTestDeclinedArray ( ) ; mg . setDeclinedEngineNames ( testingDeclinedEngines ) ; org . mozilla . android . sync . test . helpers . MockServer server = new org . mozilla . android . sync . test . helpers . MockServer ( 200 , mg . asCryptoRecord ( ) . toJSONString ( ) ) ; doSession ( server ) ; final java . util . Set < java . lang . String > expected = new java . util . HashSet < java . lang . String > ( testingDeclinedEngines ) ; final java . util . Set < java . lang . String > newDeclined = session . config . metaGlobal . getDeclinedEngineNames ( ) ; "<AssertPlaceHolder>" ; } getDeclinedEngineNames ( ) { if ( ( declined ) == null ) { return null ; } return new java . util . HashSet < java . lang . String > ( declined ) ; }
|
org . junit . Assert . assertEquals ( expected , newDeclined )
|
testFindByPrimaryKeyExisting ( ) { com . liferay . portal . kernel . model . EmailAddress newEmailAddress = addEmailAddress ( ) ; com . liferay . portal . kernel . model . EmailAddress existingEmailAddress = _persistence . findByPrimaryKey ( newEmailAddress . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertEquals ( existingEmailAddress , newEmailAddress )
|
addItem_freeformAddOneNewItem_shouldChangeSize ( ) { com . vaadin . v7 . data . util . sqlcontainer . SQLContainer container = new com . vaadin . v7 . data . util . sqlcontainer . SQLContainer ( new com . vaadin . v7 . data . util . sqlcontainer . query . FreeformQuery ( "SELECT<sp>*<sp>FROM<sp>people" , connectionPool , "ID" ) ) ; int size = container . size ( ) ; container . addItem ( ) ; "<AssertPlaceHolder>" ; } size ( ) { updateCount ( ) ; return ( ( size ) + ( sizeOfAddedItems ( ) ) ) - ( removedItems . size ( ) ) ; }
|
org . junit . Assert . assertEquals ( ( size + 1 ) , container . size ( ) )
|
testEquals_before ( ) { final org . apache . rya . api . function . temporal . EqualsTemporalInstant function = new org . apache . rya . api . function . temporal . EqualsTemporalInstant ( ) ; final org . eclipse . rdf4j . model . Value [ ] args = new org . eclipse . rdf4j . model . Value [ 2 ] ; args [ 0 ] = org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . VF . createLiteral ( org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . TIME . toString ( ) ) ; args [ 1 ] = org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . VF . createLiteral ( org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . TIME_10 . toString ( ) ) ; final org . eclipse . rdf4j . model . Value rez = function . evaluate ( org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . VF , args ) ; "<AssertPlaceHolder>" ; } evaluate ( org . eclipse . rdf4j . model . ValueFactory , org . eclipse . rdf4j . model . Value [ ] ) { if ( ( args . length ) != 2 ) { throw new org . eclipse . rdf4j . query . algebra . evaluation . ValueExprEvaluationException ( ( ( ( getURI ( ) ) + "<sp>requires<sp>exactly<sp>2<sp>arguments,<sp>got<sp>" ) + ( args . length ) ) ) ; } final java . lang . String [ ] strInterval = args [ 1 ] . stringValue ( ) . split ( "/" ) ; if ( ( strInterval . length ) != 2 ) { throw new org . eclipse . rdf4j . query . algebra . evaluation . ValueExprEvaluationException ( ( ( ( ( getURI ( ) ) + "<sp>requires<sp>the<sp>second<sp>argument:<sp>" ) + ( args [ 1 ] ) ) + "<sp>to<sp>be<sp>2<sp>dates<sp>seperated<sp>by<sp>a<sp>\'/\'" ) ) ; } try { final java . time . ZonedDateTime date1 = java . time . ZonedDateTime . parse ( args [ 0 ] . stringValue ( ) ) ; final java . time . ZonedDateTime [ ] interval = new java . time . ZonedDateTime [ ] { java . time . ZonedDateTime . parse ( strInterval [ 0 ] ) , java . time . ZonedDateTime . parse ( strInterval [ 1 ] ) } ; final boolean result = relation ( date1 , interval ) ; return valueFactory . createLiteral ( result ) ; } catch ( final java . time . format . DateTimeParseException e ) { throw new org . eclipse . rdf4j . query . algebra . evaluation . ValueExprEvaluationException ( "Date/Times<sp>provided<sp>must<sp>be<sp>of<sp>the<sp>ISO-8601<sp>format.<sp>Example:<sp>2007-04-05T14:30Z" ) ; } }
|
org . junit . Assert . assertEquals ( org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . VF . createLiteral ( false ) , rez )
|
testV6ToV7 ( ) { java . util . List < com . streamsets . pipeline . api . Config > configs = new java . util . ArrayList ( ) ; configs . add ( new com . streamsets . pipeline . api . Config ( "a" 2 , 1000 ) ) ; configs . add ( new com . streamsets . pipeline . api . Config ( "a" 0 , com . streamsets . pipeline . lib . http . AuthenticationType . NONE ) ) ; configs . add ( new com . streamsets . pipeline . api . Config ( "conf.oauth" , new com . streamsets . pipeline . lib . http . OAuthConfigBean ( ) ) ) ; configs . add ( new com . streamsets . pipeline . api . Config ( "a" 5 , new com . streamsets . pipeline . lib . http . PasswordAuthConfigBean ( ) ) ) ; configs . add ( new com . streamsets . pipeline . api . Config ( "a" 6 , false ) ) ; configs . add ( new com . streamsets . pipeline . api . Config ( "a" 7 , new com . streamsets . pipeline . lib . http . HttpProxyConfigBean ( ) ) ) ; configs . add ( new com . streamsets . pipeline . api . Config ( "conf.sslConfig" , new com . streamsets . pipeline . lib . http . SslConfigBean ( ) ) ) ; com . streamsets . pipeline . stage . origin . http . HttpClientSourceUpgrader upgrader = new com . streamsets . pipeline . stage . origin . http . HttpClientSourceUpgrader ( ) ; upgrader . upgrade ( "a" , "b" , "c" , 6 , 7 , configs ) ; java . util . Map < java . lang . String , java . lang . Object > configValues = com . streamsets . pipeline . stage . origin . http . TestHttpClientSourceUpgrader . getConfigsAsMap ( configs ) ; java . util . List < java . lang . String > movedConfigs = com . google . common . collect . ImmutableList . of ( "conf.client.requestTimeoutMillis" , "conf.client.authType" , "a" 4 , "a" 3 , "conf.client.useProxy" , "a" 1 , "conf.client.sslConfig" ) ; for ( java . lang . String config : movedConfigs ) { boolean isPresent = configValues . containsKey ( config ) ; com . streamsets . pipeline . stage . origin . http . TestHttpClientSourceUpgrader . LOG . debug ( "{}<sp>is<sp>present:<sp>{}" , config , isPresent ) ; "<AssertPlaceHolder>" ; } } containsKey ( java . lang . Object ) { return super . containsKey ( key ) ; }
|
org . junit . Assert . assertTrue ( isPresent )
|
testCantReuseIfNotClosed ( ) { com . facebook . common . references . CloseableReference < com . facebook . imagepipeline . image . CloseableImage > ret = mAnimatedFrameCache . cache ( 1 , mFrame1 ) ; com . facebook . common . references . CloseableReference < com . facebook . imagepipeline . image . CloseableImage > free = mAnimatedFrameCache . getForReuse ( ) ; "<AssertPlaceHolder>" ; } getForReuse ( ) { while ( true ) { com . facebook . cache . common . CacheKey key = popFirstFreeItemKey ( ) ; if ( key == null ) { return null ; } com . facebook . common . references . CloseableReference < com . facebook . imagepipeline . image . CloseableImage > imageRef = mBackingCache . reuse ( key ) ; if ( imageRef != null ) { return imageRef ; } } }
|
org . junit . Assert . assertNull ( free )
|
deveObterCodigoMunicipioComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . NFEndereco endereco = new com . fincatto . documentofiscal . nfe310 . classes . NFEndereco ( ) ; endereco . setCodigoMunicipio ( "9999999" ) ; "<AssertPlaceHolder>" ; } getCodigoMunicipio ( ) { return this . codigoMunicipio ; }
|
org . junit . Assert . assertEquals ( "9999999" , endereco . getCodigoMunicipio ( ) )
|
testEnableSsl ( ) { lombok . val channelConfig = com . xjeffrose . xio . bootstrap . ChannelConfiguration . clientConfig ( 1 , "worker" ) ; lombok . val clientConfig = com . xjeffrose . xio . client . ClientConfig . from ( com . typesafe . config . ConfigFactory . load ( ) . getConfig ( "xio.sslClient" ) ) ; lombok . val clientState = new com . xjeffrose . xio . http . ClientState ( channelConfig , clientConfig ) ; when ( tracing . newClientHandler ( ) ) . thenReturn ( tracingHandler ) ; subject = new com . xjeffrose . xio . http . ClientChannelInitializer ( clientState , ( ) -> appHandler , tracing ) ; lombok . val testChannel = new io . netty . channel . embedded . EmbeddedChannel ( subject ) ; lombok . val result = testChannel . pipeline ( ) . get ( io . netty . handler . ssl . SslHandler . class ) ; "<AssertPlaceHolder>" ; } get ( okhttp3 . Request ) { try ( okhttp3 . Response response = client . newCall ( request ) . execute ( ) ) { if ( ( response . code ( ) ) == 404 ) { throw new org . junit . AssumptionViolatedException ( ( ( request . url ( ) . encodedPath ( ) ) + "<sp>not<sp>supported" ) ) ; } return response ; } }
|
org . junit . Assert . assertNotNull ( result )
|
testSetEndpoint ( ) { d_wizard . getIndicationModel ( ) . setValue ( org . drugis . addis . ExampleData . buildIndicationDepression ( ) ) ; org . drugis . addis . entities . OutcomeMeasure newValue = org . drugis . addis . ExampleData . buildEndpointHamd ( ) ; com . jgoodies . binding . value . ValueModel vm = d_wizard . getOutcomeMeasureModel ( ) ; org . drugis . common . JUnitUtil . testSetter ( vm , null , newValue ) ; "<AssertPlaceHolder>" ; } getOutcomeMeasureModel ( ) { return d_mgr . getLabeledModel ( org . drugis . addis . presentation . AbstractMetaAnalysisPresentation . getBean ( ) . getOutcomeMeasure ( ) ) ; }
|
org . junit . Assert . assertEquals ( newValue , d_wizard . getOutcomeMeasureModel ( ) . getValue ( ) )
|
test2 ( ) { udt . UDTInputStream is = new udt . UDTInputStream ( null ) ; byte [ ] data1 = getRandomData ( 65537 ) ; byte [ ] data2 = getRandomData ( 1234 ) ; byte [ ] data3 = getRandomData ( ( ( 3 * 1024 ) * 1024 ) ) ; java . lang . String digest = computeMD5 ( data1 , data2 , data3 ) ; is . setBlocking ( false ) ; is . haveNewData ( 1 , data1 ) ; is . haveNewData ( 2 , data2 ) ; is . haveNewData ( 3 , data3 ) ; is . noMoreData ( ) ; java . lang . String readMD5 = readAll ( is , ( ( 5 * 1024 ) * 1024 ) ) ; "<AssertPlaceHolder>" ; } readAll ( java . io . InputStream , int ) { java . security . MessageDigest d = java . security . MessageDigest . getInstance ( "MD5" ) ; int c = 0 ; byte [ ] buf = new byte [ bufsize ] ; while ( true ) { c = is . read ( buf ) ; if ( c == ( - 1 ) ) break ; else { d . update ( buf , 0 , c ) ; } } return udt . UDTTestBase . hexString ( d ) ; }
|
org . junit . Assert . assertEquals ( digest , readMD5 )
|
isTopPriorityTest1 ( ) { boolean b = VariantType . MISSENSE . isTopPriorityVariant ( ) ; "<AssertPlaceHolder>" ; } isTopPriorityVariant ( ) { return ( jannovar . common . VariantType . priorityLevel ( this ) ) == 1 ; }
|
org . junit . Assert . assertEquals ( true , b )
|
testTypeClass3 ( ) { com . baidu . bjf . remoting . protobuf . Codec < com . baidu . bjf . remoting . protobuf . bytestest . ByteTypeClass3 > codec = com . baidu . bjf . remoting . protobuf . ProtobufProxy . create ( com . baidu . bjf . remoting . protobuf . bytestest . ByteTypeClass3 . class ) ; com . baidu . bjf . remoting . protobuf . bytestest . ByteTypeClass3 o = new com . baidu . bjf . remoting . protobuf . bytestest . ByteTypeClass3 ( ) ; o . setBytes ( new byte [ ] { 1 , 2 } ) ; byte [ ] bb = codec . encode ( o ) ; com . baidu . bjf . remoting . protobuf . bytestest . ByteTypeClass3 class1 = codec . decode ( bb ) ; "<AssertPlaceHolder>" ; } decode ( byte [ ] ) { if ( bytes == null ) { throw new java . io . IOException ( "byte<sp>array<sp>is<sp>null." ) ; } com . google . protobuf . CodedInputStream input = com . google . protobuf . CodedInputStream . newInstance ( bytes , 0 , bytes . length ) ; return readFrom ( input ) ; }
|
org . junit . Assert . assertArrayEquals ( o . getBytes ( ) , class1 . getBytes ( ) )
|
shouldSucceed ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( true )
|
testTaskCreation ( ) { int taskId = this . dao . createTask ( "annotator1" , "dataset1" , "type1" , "matching1" , "id-23456" ) ; "<AssertPlaceHolder>" ; } createTask ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { org . springframework . jdbc . core . namedparam . MapSqlParameterSource params = createTaskParameters ( annotatorName , datasetName , experimentType , matching ) ; params . addValue ( "state" , ExperimentDAO . TASK_STARTED_BUT_NOT_FINISHED_YET ) ; java . util . Date today = new java . util . Date ( ) ; params . addValue ( "lastChanged" , new java . sql . Timestamp ( today . getTime ( ) ) ) ; params . addValue ( "version" , org . aksw . gerbil . config . GerbilConfiguration . getGerbilVersion ( ) ) ; org . springframework . jdbc . support . KeyHolder keyHolder = new org . springframework . jdbc . support . GeneratedKeyHolder ( ) ; this . template . update ( org . aksw . gerbil . database . ExperimentDAOImpl . INSERT_TASK , params , keyHolder ) ; java . lang . Integer generatedKey = ( ( java . lang . Integer ) ( keyHolder . getKey ( ) ) ) ; if ( experimentId != null ) { connectToExperiment ( experimentId , generatedKey ) ; } return generatedKey ; }
|
org . junit . Assert . assertTrue ( ( taskId > 0 ) )
|
testAProcessingFunctionWrongArgumentNumber ( ) { try { new org . aksw . limes . core . io . preprocessing . functions . ToUppercase ( ) . applyFunction ( testInstance , org . aksw . limes . core . io . preprocessing . PreprocessingFunctionsTest . PROP_LABEL , "bla" ) ; "<AssertPlaceHolder>" ; } catch ( org . aksw . limes . core . exceptions . IllegalNumberOfParametersException e ) { } } applyFunction ( org . aksw . limes . core . io . cache . Instance , java . lang . String , java . lang . String [ ] ) { testIfNumberOfArgumentsIsLegal ( arguments ) ; return applyFunctionAfterCheck ( inst , property , arguments ) ; }
|
org . junit . Assert . assertFalse ( true )
|
decode ( ) { java . lang . String encodedSessionId = "session.route" ; java . lang . String sessionId = "session" ; java . lang . String route = "route" ; when ( this . routing . parse ( encodedSessionId ) ) . thenReturn ( new java . util . AbstractMap . SimpleImmutableEntry ( sessionId , route ) ) ; java . lang . CharSequence result = this . codec . decode ( encodedSessionId ) ; "<AssertPlaceHolder>" ; } decode ( java . lang . CharSequence ) { return encodedSessionId != null ? this . routing . parse ( encodedSessionId ) . getKey ( ) : null ; }
|
org . junit . Assert . assertSame ( sessionId , result )
|
testAvgWithRangeLargerThanTable ( ) { int TIME_BASELINE = ( ( int ) ( ( new java . util . GregorianCalendar ( 2014 , 10 , 9 , 23 , 0 , 0 ) . getTime ( ) . getTime ( ) ) / 1000 ) ) ; int TIME_LIMIT = ( ( int ) ( ( new java . util . GregorianCalendar ( 2014 , 10 , 15 , 0 , 0 , 0 ) . getTime ( ) . getTime ( ) ) / 1000 ) ) ; org . apache . hadoop . hbase . coprocessor . client . TimeseriesAggregationClient aClient = new org . apache . hadoop . hbase . coprocessor . client . TimeseriesAggregationClient ( org . apache . hadoop . hbase . coprocessor . TestTimeseriesAggregateProtocol . conf , 28800 , TIME_BASELINE , TIME_LIMIT , org . apache . hadoop . hbase . coprocessor . TestTimeseriesAggregateProtocol . KEY_FILTER_PATTERN ) ; org . apache . hadoop . hbase . client . Scan scan = new org . apache . hadoop . hbase . client . Scan ( ) ; scan . addFamily ( org . apache . hadoop . hbase . coprocessor . TestTimeseriesAggregateProtocol . TEST_FAMILY ) ; final org . apache . hadoop . hbase . coprocessor . ColumnInterpreter < java . lang . Long , java . lang . Long , org . apache . hadoop . hbase . protobuf . generated . HBaseProtos . EmptyMsg , org . apache . hadoop . hbase . protobuf . generated . HBaseProtos . LongMsg , org . apache . hadoop . hbase . protobuf . generated . HBaseProtos . LongMsg > ci = new org . apache . hadoop . hbase . client . coprocessor . LongColumnInterpreter ( ) ; java . util . Map < java . lang . Long , java . lang . Double > results = new java . util . concurrent . ConcurrentSkipListMap < java . lang . Long , java . lang . Double > ( ) ; results . put ( 1415570400000L , 49.5 ) ; results . put ( 1415599200000L , 49.5 ) ; results . put ( 1415628000000L , 49.5 ) ; results . put ( 1415656800000L , 49.5 ) ; results . put ( 1415685600000L , 49.5 ) ; results . put ( 1415714400000L , 49.5 ) ; results . put ( 1415743200000L , 49.5 ) ; results . put ( 1415772000000L , 49.5 ) ; results . put ( 1415800800000L , 49.5 ) ; results . put ( 1415829600000L , 49.5 ) ; results . put ( 1415858400000L , 49.5 ) ; results . put ( 1415887200000L , 49.5 ) ; results . put ( 1415916000000L , 49.5 ) ; java . util . concurrent . ConcurrentSkipListMap < java . lang . Long , java . lang . Double > avgs = aClient . avg ( org . apache . hadoop . hbase . coprocessor . TestTimeseriesAggregateProtocol . TEST_TABLE , ci , scan ) ; "<AssertPlaceHolder>" ; aClient . close ( ) ; } avg ( org . apache . hadoop . hbase . client . Table , org . apache . hadoop . hbase . coprocessor . ColumnInterpreter , org . apache . hadoop . hbase . client . Scan ) { java . util . concurrent . ConcurrentSkipListMap < java . lang . Long , org . apache . hadoop . hbase . util . Pair < S , java . lang . Long > > p = getAvgArgs ( table , ci , scan ) ; java . util . concurrent . ConcurrentSkipListMap < java . lang . Long , java . lang . Double > avg = new java . util . concurrent . ConcurrentSkipListMap < java . lang . Long , java . lang . Double > ( ) ; for ( Map . Entry < java . lang . Long , org . apache . hadoop . hbase . util . Pair < S , java . lang . Long > > entry : p . entrySet ( ) ) { avg . put ( entry . getKey ( ) , ci . divideForAvg ( entry . getValue ( ) . getFirst ( ) , entry . getValue ( ) . getSecond ( ) ) ) ; } return avg ; }
|
org . junit . Assert . assertEquals ( results , avgs )
|
testStrings ( ) { tokenizer . tokenize ( toSourceCode ( "String<sp>s<sp>=\"aaa<sp>\\\"b\\n\";" ) , tokens ) ; "<AssertPlaceHolder>" ; } size ( ) { return rules . size ( ) ; }
|
org . junit . Assert . assertEquals ( 5 , tokens . size ( ) )
|
timesTest ( ) { ch . bfh . unicrypt . math . algebra . additive . classes . ECPolynomialField ec = ch . bfh . unicrypt . math . algebra . additive . classes . ECPolynomialField . getInstance ( ECPolynomialFieldParameters . SECT113r1 ) ; ch . bfh . unicrypt . math . algebra . dualistic . classes . PolynomialField field = ec . getFiniteField ( ) ; ch . bfh . unicrypt . helper . array . classes . BitArray b1 = ch . bfh . unicrypt . helper . array . classes . BitArray . getInstance ( "10001111101000111011110111101100110110111110001111011011000110011111100011111100000010111011001010011000001101101" ) ; ch . bfh . unicrypt . helper . array . classes . BitArray b2 = ch . bfh . unicrypt . helper . array . classes . BitArray . getInstance ( "00001011001111001111100101000101010000111011001011000100100000011111110001110110000101111001011101010111101010111" ) ; ch . bfh . unicrypt . helper . array . classes . BitArray b5 = ch . bfh . unicrypt . helper . array . classes . BitArray . getInstance ( "11100110010100001001101011110011110000111100111000011100010101101100001000111000110101011100010010100100011010101" ) ; ch . bfh . unicrypt . helper . array . classes . BitArray b6 = ch . bfh . unicrypt . helper . array . classes . BitArray . getInstance ( "10110100010100110111000001001011011000001101101011101001100100111011000011000101111101101000101010111110100100011" ) ; ch . bfh . unicrypt . math . algebra . dualistic . classes . PolynomialElement x1 = field . getElement ( b1 ) ; ch . bfh . unicrypt . math . algebra . dualistic . classes . PolynomialElement y1 = field . getElement ( b2 ) ; ch . bfh . unicrypt . math . algebra . dualistic . classes . PolynomialElement rx = field . getElement ( b5 ) ; ch . bfh . unicrypt . math . algebra . dualistic . classes . PolynomialElement ry = field . getElement ( b6 ) ; ch . bfh . unicrypt . math . algebra . additive . classes . ECPolynomialElement e1 = ec . getElement ( x1 , y1 ) ; ch . bfh . unicrypt . math . algebra . additive . classes . ECPolynomialElement result = ec . getElement ( rx , ry ) ; "<AssertPlaceHolder>" ; } add ( V ) { return this . insertAt ( this . length , value ) ; }
|
org . junit . Assert . assertEquals ( result , e1 . add ( e1 ) )
|
testMatchPerfect ( ) { org . eclipse . pde . ui . tests . project . IPluginModelBase model = org . eclipse . pde . ui . tests . project . PluginRegistry . findModel ( "org.eclipse.jdt.debug" , "3.0.0" , IMatchRules . PERFECT , null ) ; "<AssertPlaceHolder>" ; } findModel ( java . lang . String , java . lang . String , int , org . eclipse . pde . core . plugin . PluginRegistry$PluginFilter ) { return org . eclipse . pde . core . plugin . PluginRegistry . getMax ( org . eclipse . pde . core . plugin . PluginRegistry . findModels ( id , version , match , filter ) ) ; }
|
org . junit . Assert . assertNull ( model )
|
consoleHandlerFlushesSevere ( ) { com . facebook . buck . log . ConsoleHandler handler = new com . facebook . buck . log . ConsoleHandler ( com . facebook . buck . log . ConsoleHandler . utf8OutputStreamWriter ( outputStream ) , new com . facebook . buck . log . ConsoleHandlerTest . MessageOnlyFormatter ( ) , java . util . logging . Level . INFO , state ) ; handler . publish ( new java . util . logging . LogRecord ( java . util . logging . Level . SEVERE , "Severe" ) ) ; "<AssertPlaceHolder>" ; } getLastFlushSize ( ) { return lastFlushSize ; }
|
org . junit . Assert . assertThat ( outputStream . getLastFlushSize ( ) , org . hamcrest . Matchers . equalTo ( 6 ) )
|
testFindByLastname ( ) { java . lang . String hql = "from<sp>Person<sp>p<sp>where<sp>p.lastname<sp>=<sp>:lastname" ; java . lang . String lastname = "Smith" ; java . util . List < com . tddinaction . data . person . Person > theSmiths = new java . util . ArrayList < com . tddinaction . data . person . Person > ( ) ; theSmiths . add ( new com . tddinaction . data . person . Person ( "Alice" , lastname ) ) ; theSmiths . add ( new com . tddinaction . data . person . Person ( "Billy" , lastname ) ) ; theSmiths . add ( new com . tddinaction . data . person . Person ( "Clark" , lastname ) ) ; expect ( factory . getCurrentSession ( ) ) . andReturn ( session ) ; expect ( session . createQuery ( hql ) ) . andReturn ( query ) ; expect ( query . setParameter ( "lastname" , lastname ) ) . andReturn ( query ) ; expect ( query . list ( ) ) . andReturn ( theSmiths ) ; replay ( factory , session , query ) ; com . tddinaction . data . hibernate . HibernatePersonDao dao = new com . tddinaction . data . hibernate . HibernatePersonDao ( ) ; dao . setSessionFactory ( factory ) ; "<AssertPlaceHolder>" ; verify ( factory , session , query ) ; } findByLastname ( java . lang . String ) { java . lang . String sql = "SELECT<sp>*<sp>FROM<sp>employee<sp>WHERE<sp>last_name<sp>=<sp>?" ; java . lang . String [ ] args = new java . lang . String [ ] { lastname } ; org . springframework . jdbc . core . RowMapper mapper = new com . tddinaction . data . spring . jdbc . PersonRowMapper ( ) ; return getJdbcTemplate ( ) . query ( sql , args , mapper ) ; }
|
org . junit . Assert . assertEquals ( theSmiths , dao . findByLastname ( lastname ) )
|
testSetWriter ( ) { java . io . File aux = new java . io . File ( "src/test/resources/xml" ) ; aux . mkdirs ( ) ; java . io . File xml = new java . io . File ( aux , "walkmod.xml" ) ; org . walkmod . conf . providers . XMLConfigurationProvider prov = new org . walkmod . conf . providers . XMLConfigurationProvider ( xml . getPath ( ) , false ) ; try { org . walkmod . conf . entities . Configuration conf = new org . walkmod . conf . entities . impl . ConfigurationImpl ( ) ; prov . init ( conf ) ; prov . createConfig ( ) ; org . walkmod . commands . AddTransformationCommand command = new org . walkmod . commands . AddTransformationCommand ( "imports-cleaner" , null , false , null , null , null , null , false ) ; prov . addTransformationConfig ( null , null , command . buildTransformationCfg ( ) , false , null , null ) ; prov . setWriter ( null , "javalang:string-writer" , null , false , null ) ; java . lang . String output = org . apache . commons . io . FileUtils . readFileToString ( xml ) ; System . out . println ( output ) ; "<AssertPlaceHolder>" ; } finally { if ( xml . exists ( ) ) { xml . delete ( ) ; } } } setWriter ( java . lang . String , java . lang . String , java . lang . String , boolean , java . util . Map ) { if ( ( ( type != null ) && ( ! ( "" . equals ( type . trim ( ) ) ) ) ) || ( ( path != null ) && ( ! ( "" . equals ( path . trim ( ) ) ) ) ) ) { org . walkmod . conf . providers . yml . SetWriterYMLAction action = new org . walkmod . conf . providers . yml . SetWriterYMLAction ( chain , type , path , this , recursive , params ) ; action . execute ( ) ; } }
|
org . junit . Assert . assertTrue ( output . contains ( "javalang:string-writer" ) )
|
should_returnOneNodeGenerationUnit ( ) { ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . GenerationSubPackage subPackage1 = new ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . GenerationSubPackage ( ) ; subPackage1 . addGenerationUnit ( new ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . GenerationUnit ( builder . resourceFor ( EntityBuilderType . NODE1 ) , builder . resourceFor ( EntityBuilderType . AS ) , null , null ) ) ; subPackage1 . setPackageGenerationUnit ( new ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . GenerationUnit ( builder . resourceFor ( EntityBuilderType . AS ) , null , null , null ) ) ; ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . GenerationSubPackage subPackage2 = new ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . GenerationSubPackage ( ) ; subPackage2 . addGenerationUnit ( new ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . GenerationUnit ( builder . resourceFor ( EntityBuilderType . APP ) , builder . resourceFor ( EntityBuilderType . AS ) , null , null ) ) ; subPackage2 . setPackageGenerationUnit ( new ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . GenerationUnit ( builder . resourceFor ( EntityBuilderType . AS ) , null , null , null ) ) ; g . addGenerationSubPackage ( subPackage1 ) ; g . addGenerationSubPackage ( subPackage2 ) ; ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . Set < ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . GenerationUnit > nodeUnits = g . getNodeGenerationUnits ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return keySet ( ) . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , nodeUnits . size ( ) )
|
testhandleBeginContact3 ( ) { expect ( contact . getFixtureA ( ) ) . andReturn ( fixMock ) . anyTimes ( ) ; replay ( contact ) ; com . rubentxu . juegos . core . managers . HeroManagerTest . r . getGrounContacts ( ) . clear ( ) ; com . rubentxu . juegos . core . managers . HeroManagerTest . heroManager . handleBeginContact ( contact ) ; "<AssertPlaceHolder>" ; } getGrounContacts ( ) { return grounContacts ; }
|
org . junit . Assert . assertTrue ( com . rubentxu . juegos . core . managers . HeroManagerTest . r . getGrounContacts ( ) . isEmpty ( ) )
|
testRadix10Neg ( ) { java . lang . String value = "-2489756308572364789878394872984" ; int radix = 16 ; java . math . BigInteger aNumber = new java . math . BigInteger ( value , radix ) ; java . lang . String result = aNumber . toString ( radix ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( object instanceof org . teavm . classlib . java . text . TParsePosition ) ) { return false ; } org . teavm . classlib . java . text . TParsePosition pos = ( ( org . teavm . classlib . java . text . TParsePosition ) ( object ) ) ; return ( ( currentPosition ) == ( pos . currentPosition ) ) && ( ( errorIndex ) == ( pos . errorIndex ) ) ; }
|
org . junit . Assert . assertTrue ( result . equals ( value ) )
|
test ( ) { org . apache . shiro . web . filter . authc . AnonymousFilter filter = new org . apache . shiro . web . filter . authc . AnonymousFilter ( ) ; boolean allow = filter . onPreHandle ( null , null , null ) ; "<AssertPlaceHolder>" ; } onPreHandle ( javax . servlet . ServletRequest , javax . servlet . ServletResponse , java . lang . Object ) { return false ; }
|
org . junit . Assert . assertTrue ( allow )
|
testUpRequestCreationWithNullTransports ( ) { org . kaaproject . kaa . client . persistence . KaaClientState state = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . persistence . KaaClientState . class ) ; org . kaaproject . kaa . client . channel . impl . DefaultOperationDataProcessor operationsDataProcessor = new org . kaaproject . kaa . client . channel . impl . DefaultOperationDataProcessor ( state ) ; java . util . Map < org . kaaproject . kaa . common . TransportType , org . kaaproject . kaa . client . channel . ChannelDirection > transportTypes = new java . util . HashMap < org . kaaproject . kaa . common . TransportType , org . kaaproject . kaa . client . channel . ChannelDirection > ( ) ; transportTypes . put ( TransportType . PROFILE , ChannelDirection . BIDIRECTIONAL ) ; transportTypes . put ( TransportType . CONFIGURATION , ChannelDirection . BIDIRECTIONAL ) ; transportTypes . put ( TransportType . NOTIFICATION , ChannelDirection . BIDIRECTIONAL ) ; transportTypes . put ( TransportType . USER , ChannelDirection . BIDIRECTIONAL ) ; transportTypes . put ( TransportType . EVENT , ChannelDirection . BIDIRECTIONAL ) ; transportTypes . put ( TransportType . LOGGING , ChannelDirection . BIDIRECTIONAL ) ; "<AssertPlaceHolder>" ; } compileRequest ( java . util . Map ) { if ( ( transport ) != null ) { org . kaaproject . kaa . common . endpoint . gen . SyncRequest request = transport . createResolveRequest ( ) ; org . kaaproject . kaa . client . channel . impl . DefaultBootstrapDataProcessor . LOG . trace ( "Created<sp>Resolve<sp>request<sp>{}" , request ) ; return requestConverter . toByteArray ( request ) ; } return null ; }
|
org . junit . Assert . assertNotNull ( operationsDataProcessor . compileRequest ( transportTypes ) )
|
testGreenOverHorizontal ( ) { expected = loadCompatibleImage ( org . jdesktop . swingx . graphics . BlendCompositeTest . class . getResourceAsStream ( "green-over-horizontal.gif" ) ) ; java . awt . image . BufferedImage green = org . jdesktop . swingx . util . GraphicsUtilities . createCompatibleImage ( org . jdesktop . swingx . graphics . BlendCompositeTest . VERTICAL_IMAGE ) ; java . awt . Graphics2D g = green . createGraphics ( ) ; try { g . setColor ( Color . GREEN ) ; g . fillRect ( 0 , 0 , green . getWidth ( ) , green . getHeight ( ) ) ; } finally { g . dispose ( ) ; } blend ( org . jdesktop . swingx . graphics . BlendCompositeTest . HORIZONTAL_IMAGE , BlendComposite . Green , green ) ; "<AssertPlaceHolder>" ; } getPixels ( java . awt . image . BufferedImage , int , int , int , int , int [ ] ) { if ( ( w == 0 ) || ( h == 0 ) ) { return new int [ 0 ] ; } if ( pixels == null ) { pixels = new int [ w * h ] ; } else if ( ( pixels . length ) < ( w * h ) ) { throw new java . lang . IllegalArgumentException ( ( "pixels<sp>array<sp>must<sp>have<sp>a<sp>length" + "<sp>>=<sp>w*h" ) ) ; } int imageType = img . getType ( ) ; if ( ( imageType == ( java . awt . image . BufferedImage . TYPE_INT_ARGB ) ) || ( imageType == ( java . awt . image . BufferedImage . TYPE_INT_RGB ) ) ) { java . awt . image . Raster raster = img . getRaster ( ) ; return ( ( int [ ] ) ( raster . getDataElements ( x , y , w , h , pixels ) ) ) ; } return img . getRGB ( x , y , w , h , pixels , 0 , w ) ; }
|
org . junit . Assert . assertArrayEquals ( getPixels ( expected , 0 , 0 , expected . getWidth ( ) , expected . getHeight ( ) , null ) , getPixels ( actual , 0 , 0 , actual . getWidth ( ) , actual . getHeight ( ) , null ) )
|
testConstructor ( ) { org . openhealthtools . mdht . uml . cda . ccd . operations . AdvanceDirectiveStatusObservationOperations obj = new org . openhealthtools . mdht . uml . cda . ccd . operations . AdvanceDirectiveStatusObservationOperations ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( true )
|
testGenerateLocalizedXLIFFWithDifferentOutputTag ( ) { createTestData ( ) ; com . box . l10n . mojito . service . tm . TMTextUnit tmTextUnit1 = tmService . addTMTextUnit ( tmId , assetId , "Application<sp>Name" 0 , "Application<sp>Name" , "This<sp>text<sp>is<sp>shown<sp>in<sp>the<sp>start<sp>screen<sp>of<sp>the<sp>application.<sp>Keep<sp>it<sp>short." ) ; com . box . l10n . mojito . service . tm . TMTextUnit tmTextUnit2 = tmService . addTMTextUnit ( tmId , assetId , "home" , "Home" , "This<sp>is<sp>the<sp>text<sp>displayed<sp>in<sp>the<sp>link<sp>that<sp>takes<sp>the<sp>user<sp>to<sp>the<sp>home<sp>page." ) ; com . box . l10n . mojito . service . tm . TMTextUnit tmTextUnit3 = tmService . addTMTextUnit ( tmId , assetId , "fail_integrity_check" , "I<sp>fail<sp>integrity<sp>check" , null ) ; com . box . l10n . mojito . service . tm . RepositoryLocale repositoryLocale = repositoryLocaleRepository . findByRepositoryAndLocale_Bcp47Tag ( repository , "fr-FR" ) ; com . box . l10n . mojito . service . tm . Locale locale = repositoryLocale . getLocale ( ) ; tmService . addCurrentTMTextUnitVariant ( tmTextUnit1 . getId ( ) , locale . getId ( ) , "Application<sp>Name" 1 ) ; com . box . l10n . mojito . service . tm . TMTextUnitVariant variant1 = tmService . addCurrentTMTextUnitVariant ( tmTextUnit1 . getId ( ) , locale . getId ( ) , "Nom<sp>de<sp>l'application" ) ; tmService . addTMTextUnitCurrentVariant ( tmTextUnit3 . getId ( ) , locale . getId ( ) , "!?!?!?!?!" , null , TMTextUnitVariant . Status . REVIEW_NEEDED , false ) ; java . lang . String sourceXLIFF = getSourceXLIFFContent ( com . google . common . collect . Lists . newArrayList ( tmTextUnit1 , tmTextUnit2 , tmTextUnit3 ) ) ; java . lang . String outputBcp47tag = "fr-FR" ; java . lang . String localizedAsset = tmService . generateLocalized ( asset , sourceXLIFF , repositoryLocale , outputBcp47tag , null , null , Status . ALL , InheritanceMode . USE_PARENT ) ; java . lang . String expectedLocalizedXLIFF = getExpectedLocalizedXLIFFContent ( outputBcp47tag , tmTextUnit1 , tmTextUnit2 , tmTextUnit3 , variant1 ) ; "<AssertPlaceHolder>" ; } removeLeadingAndTrailingSpacesOnEveryLine ( java . lang . String ) { return string . replaceAll ( "(?m)^[\\s&&[^\\n]]+|[\\s+&&[^\\n]]+$" , "" ) ; }
|
org . junit . Assert . assertEquals ( removeLeadingAndTrailingSpacesOnEveryLine ( expectedLocalizedXLIFF ) , removeLeadingAndTrailingSpacesOnEveryLine ( localizedAsset ) )
|
shouldPersistAndRetrieveMetadataLeader ( ) { org . neo4j . graphdb . GraphDatabaseService mainDatabase = getLeaderDatabase ( ) ; repository = new com . graphaware . runtime . metadata . GraphPropertiesMetadataRepository ( mainDatabase , com . graphaware . runtime . config . FluentRuntimeConfiguration . defaultConfiguration ( mainDatabase ) , "TEST-LEADER" ) ; com . graphaware . runtime . metadata . ModuleMetadata metadata = new com . graphaware . runtime . metadata . DefaultTxDrivenModuleMetadata ( com . graphaware . runtime . config . FluentTxDrivenModuleConfiguration . defaultConfiguration ( ) ) ; repository . persistModuleMetadata ( "TEST-LEADER" , metadata ) ; "<AssertPlaceHolder>" ; } getModuleMetadata ( java . lang . String ) { final java . lang . String key = moduleKey ( moduleId ) ; java . util . Map < java . lang . String , java . lang . Object > internalProperties = getInternalProperties ( ) ; try { byte [ ] serializedMetadata = ( ( byte [ ] ) ( internalProperties . get ( key ) ) ) ; if ( serializedMetadata == null ) { return null ; } return com . graphaware . common . serialize . Serializer . fromByteArray ( serializedMetadata ) ; } catch ( java . lang . Exception e ) { removeModuleMetadata ( moduleId ) ; com . graphaware . runtime . metadata . GraphPropertiesMetadataRepository . LOG . error ( ( "Could<sp>not<sp>deserialize<sp>metadata<sp>for<sp>module<sp>ID<sp>" + moduleId ) ) ; throw new com . graphaware . runtime . metadata . CorruptMetadataException ( e ) ; } }
|
org . junit . Assert . assertEquals ( metadata , repository . getModuleMetadata ( "TEST-LEADER" ) )
|
testSqlQueryGetSingleResult ( ) { org . dayatang . querychannel . domain . MyEntity result = instance . createSqlQuery ( "select<sp>*<sp>from<sp>pay_test_myentity<sp>o<sp>where<sp>o.id<sp>=<sp>1" ) . setResultEntityClass ( org . dayatang . querychannel . domain . MyEntity . class ) . singleResult ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Long ) { return getRepository ( ) . get ( org . dayatang . querychannel . domain . MyEntity . class , id ) ; }
|
org . junit . Assert . assertEquals ( org . dayatang . querychannel . domain . MyEntity . get ( 1L ) , result )
|
testDataStoreListener ( ) { final org . opendaylight . yangtools . yang . binding . InstanceIdentifier < org . opendaylight . yangtools . yang . binding . DataObject > instanceIdentifier = org . opendaylight . yangtools . yang . binding . InstanceIdentifier . create ( org . opendaylight . yangtools . yang . binding . DataObject . class ) ; final org . opendaylight . mdsal . binding . api . DataTreeIdentifier < org . opendaylight . yangtools . yang . binding . DataObject > testId = org . opendaylight . mdsal . binding . api . DataTreeIdentifier . create ( LogicalDatastoreType . OPERATIONAL , instanceIdentifier ) ; final org . opendaylight . netconf . mdsal . notification . impl . OperationalDatastoreListener < org . opendaylight . yangtools . yang . binding . DataObject > op = new org . opendaylight . netconf . mdsal . notification . impl . OperationalDatastoreListener < org . opendaylight . yangtools . yang . binding . DataObject > ( instanceIdentifier ) { @ org . opendaylight . netconf . mdsal . notification . impl . Override public void onDataTreeChanged ( final java . util . Collection < org . opendaylight . mdsal . binding . api . DataTreeModification < org . opendaylight . yangtools . yang . binding . DataObject > > collection ) { } } ; doReturn ( null ) . when ( dataBroker ) . registerDataTreeChangeListener ( any ( ) , any ( ) ) ; org . mockito . ArgumentCaptor < org . opendaylight . mdsal . binding . api . DataTreeIdentifier > argumentId = org . mockito . ArgumentCaptor . forClass ( org . opendaylight . mdsal . binding . api . DataTreeIdentifier . class ) ; op . registerOnChanges ( dataBroker ) ; verify ( dataBroker ) . registerDataTreeChangeListener ( argumentId . capture ( ) , any ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertEquals ( testId , argumentId . getValue ( ) )
|
testParseNoWikiBlockMultiple ( ) { com . liferay . wiki . engine . creole . internal . parser . ast . WikiPageNode wikiPageNode = getWikiPageNode ( "nowikiblock-2.creole" ) ; "<AssertPlaceHolder>" ; } getChildASTNodesCount ( ) { return _collectionNode . size ( ) ; }
|
org . junit . Assert . assertEquals ( 3 , wikiPageNode . getChildASTNodesCount ( ) )
|
testJSDocParsingWithoutMainDescription ( ) { java . lang . String in = "/**<sp>\n<sp>*<sp>@stubLineTagTitle<sp>\n<sp>*/" ; eu . numberfour . n4js . jsdoc . tags . AbstractLineTagDefinition tag = new eu . numberfour . n4js . jsdoc . DocletParserTest . StubLineTagDefinition ( "stubLineTagTitle" ) ; eu . numberfour . n4js . jsdoc . DocletParser docletParser = new eu . numberfour . n4js . jsdoc . DocletParser ( new eu . numberfour . n4js . jsdoc . TagDictionary ( java . util . Arrays . asList ( tag ) ) , new eu . numberfour . n4js . jsdoc . TagDictionary < eu . numberfour . n4js . jsdoc . tags . AbstractInlineTagDefinition > ( ) ) ; eu . numberfour . n4js . jsdoc . dom . Doclet doclet = docletParser . parse ( in ) ; eu . numberfour . n4js . jsdoc . dom . LineTag lineTag = doclet . getLineTags ( ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getTitle ( ) { return title ; }
|
org . junit . Assert . assertEquals ( "stubLineTagTitle" , lineTag . getTitle ( ) . getTitle ( ) )
|
upgradeEducationsToVrc2Test ( ) { javax . xml . bind . JAXBContext jaxbContext1 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . record . summary_rc1 . Educations . class ) ; javax . xml . bind . JAXBContext jaxbContext2 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . record . summary_rc1 . Educations . class ) ; javax . xml . bind . Unmarshaller jaxbUnmarshaller = jaxbContext1 . createUnmarshaller ( ) ; java . io . InputStream rc1Stream = org . orcid . record_2_0 . ConvertVrc1ToVrc2Test . class . getClassLoader ( ) . getResourceAsStream ( "test-educations-2.0_rc1.xml" ) ; java . io . InputStream rc2Stream = org . orcid . record_2_0 . ConvertVrc1ToVrc2Test . class . getClassLoader ( ) . getResourceAsStream ( "test-educations-2.0_rc2.xml" ) ; org . orcid . jaxb . model . record . summary_rc1 . Educations rc1Educations = ( ( org . orcid . jaxb . model . record . summary_rc1 . Educations ) ( jaxbUnmarshaller . unmarshal ( rc1Stream ) ) ) ; jaxbUnmarshaller = jaxbContext2 . createUnmarshaller ( ) ; org . orcid . jaxb . model . record . summary_rc2 . Educations rc2Educations1 = ( ( org . orcid . jaxb . model . record . summary_rc2 . Educations ) ( jaxbUnmarshaller . unmarshal ( rc2Stream ) ) ) ; org . orcid . core . version . V2Convertible result = versionConverterV2_0_rc1ToV2_0_rc2 . upgrade ( new org . orcid . core . version . V2Convertible ( rc1Educations , "v2_rc1" ) ) ; org . orcid . jaxb . model . record . summary_rc2 . Educations rc2Educations2 = ( ( org . orcid . jaxb . model . record . summary_rc2 . Educations ) ( result . getObjectToConvert ( ) ) ) ; "<AssertPlaceHolder>" ; } getLastModifiedDate ( ) { return lastModifiedDate ; }
|
org . junit . Assert . assertEquals ( rc2Educations1 . getLastModifiedDate ( ) , rc2Educations2 . getLastModifiedDate ( ) )
|
testGetInputType ( ) { final org . kie . workbench . common . dmn . client . editors . types . listview . constraint . common . typed . common . BaseSelector . InputType expected = org . kie . workbench . common . dmn . client . editors . types . listview . constraint . common . typed . common . BaseSelector . InputType . NUMBER ; final org . kie . workbench . common . dmn . client . editors . types . listview . constraint . common . typed . common . BaseSelector . InputType actual = numberSelector . getInputType ( ) ; "<AssertPlaceHolder>" ; } getInputType ( ) { return org . kie . workbench . common . dmn . client . editors . types . listview . constraint . common . typed . common . BaseSelector . InputType . TEXT ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testNewInstanceOrReturnNullString ( ) { "<AssertPlaceHolder>" ; } newInstanceOrReturnNull ( java . lang . String , java . lang . Class ) { try { java . lang . Class < ? > clazz = java . lang . Class . forName ( theClassName ) ; if ( ! ( theType . isAssignableFrom ( clazz ) ) ) { throw new ca . uhn . fhir . context . ConfigurationException ( ( ( theClassName + "<sp>is<sp>not<sp>assignable<sp>to<sp>" ) + theType ) ) ; } return ( ( T ) ( clazz . newInstance ( ) ) ) ; } catch ( ca . uhn . fhir . context . ConfigurationException e ) { throw e ; } catch ( java . lang . Exception e ) { ca . uhn . fhir . util . ReflectionUtil . ourLog . info ( "Failed<sp>to<sp>instantiate<sp>{}:<sp>{}" , theClassName , e . toString ( ) ) ; return null ; } }
|
org . junit . Assert . assertEquals ( java . util . ArrayList . class , ca . uhn . fhir . util . ReflectionUtil . newInstanceOrReturnNull ( java . util . ArrayList . class . getName ( ) , java . util . List . class ) . getClass ( ) )
|
shouldConvert ( ) { br . com . uol . pagseguro . api . utils . RequestMap expectedMap = new br . com . uol . pagseguro . api . utils . RequestMap ( ) ; expectedMap . putMap ( new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "extraAmount" , "10.00" ) ; put ( "payment.mode" , "paymentMode" ) ; put ( "currency" , "BRL" ) ; put ( "notificationURL" , "notificationURL" ) ; put ( "reference" , "reference" ) ; } } ) ; br . com . uol . pagseguro . api . utils . RequestMap map = mapConverter . convert ( transactionRegistration ) ; "<AssertPlaceHolder>" ; } convert ( br . com . uol . pagseguro . api . common . domain . AccountRegisterSuggestion ) { if ( account == null ) { return null ; } br . com . uol . pagseguro . api . application . authorization . AccountV2XMLConverter convertedAccount = new br . com . uol . pagseguro . api . application . authorization . AccountV2XMLConverter ( ) ; convertedAccount . setEmail ( account . getEmail ( ) ) ; convertedAccount . setType ( account . getType ( ) ) ; convertedAccount . setPerson ( br . com . uol . pagseguro . api . application . authorization . AccountV2XMLConverter . PERSON_V_2_XML_CONVERTER . convert ( account . getPerson ( ) ) ) ; convertedAccount . setCompany ( br . com . uol . pagseguro . api . application . authorization . AccountV2XMLConverter . COMPANY_V_2_XML_CONVERTER . convert ( account . getCompany ( ) ) ) ; return convertedAccount ; }
|
org . junit . Assert . assertEquals ( expectedMap , map )
|
resolveDecimalNode ( ) { java . lang . String name = "decimal" ; java . math . BigDecimal result = java . math . BigDecimal . TEN ; com . fasterxml . jackson . databind . JsonNode node = createMock ( com . fasterxml . jackson . databind . JsonNode . class ) ; com . fasterxml . jackson . databind . JsonNode value = com . fasterxml . jackson . databind . node . DecimalNode . valueOf ( result ) ; expect ( node . get ( name ) ) . andReturn ( value ) ; java . lang . Object [ ] mocks = new java . lang . Object [ ] { node } ; replay ( mocks ) ; "<AssertPlaceHolder>" ; verify ( mocks ) ; } resolve ( java . lang . Object , java . lang . String ) { java . lang . Object value = null ; if ( context instanceof com . fasterxml . jackson . databind . node . ArrayNode ) { try { if ( name . equals ( "length" ) ) { return ( ( com . fasterxml . jackson . databind . node . ArrayNode ) ( context ) ) . size ( ) ; } value = com . github . jknack . handlebars . JsonNodeValueResolver . resolve ( ( ( com . fasterxml . jackson . databind . node . ArrayNode ) ( context ) ) . get ( java . lang . Integer . parseInt ( name ) ) ) ; } catch ( java . lang . NumberFormatException ex ) { value = null ; } } else if ( context instanceof com . fasterxml . jackson . databind . JsonNode ) { value = com . github . jknack . handlebars . JsonNodeValueResolver . resolve ( ( ( com . fasterxml . jackson . databind . JsonNode ) ( context ) ) . get ( name ) ) ; } return value == null ? UNRESOLVED : value ; }
|
org . junit . Assert . assertEquals ( result , JsonNodeValueResolver . INSTANCE . resolve ( node , name ) )
|
runTest ( ) { process . passQtiVariableToMaxima ( "x" , valueWrapper ) ; final uk . ac . ed . ph . qtiworks . mathassess . glue . types . ValueWrapper result = process . queryMaximaVariable ( "x" , valueWrapper . getClass ( ) ) ; if ( ! ( result . equals ( valueWrapper ) ) ) { uk . ac . ed . ph . qtiworks . mathassess . glue . maxima . QtiMaximaSessionQueryVariableTests . logger . warn ( ( "Input:<sp>" + ( valueWrapper ) ) ) ; uk . ac . ed . ph . qtiworks . mathassess . glue . maxima . QtiMaximaSessionQueryVariableTests . logger . warn ( ( "Got:<sp>" + result ) ) ; "<AssertPlaceHolder>" ; } } equals ( java . lang . Object ) { if ( ! ( obj instanceof uk . ac . ed . ph . qtiworks . domain . entities . User ) ) { return false ; } final uk . ac . ed . ph . qtiworks . domain . entities . User other = ( ( uk . ac . ed . ph . qtiworks . domain . entities . User ) ( obj ) ) ; return getBusinessKey ( ) . equals ( other . getBusinessKey ( ) ) ; }
|
org . junit . Assert . assertEquals ( valueWrapper , result )
|
testConvertReplyToManyDocs ( ) { final com . allanbank . mongodb . bson . builder . DocumentBuilder db = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . addInteger ( "ok" , 1 ) ; db . push ( "n" ) ; final java . util . List < com . allanbank . mongodb . bson . Document > docs = java . util . Arrays . asList ( db . build ( ) , db . build ( ) ) ; final com . allanbank . mongodb . client . message . Reply reply = new com . allanbank . mongodb . client . message . Reply ( 0 , 0 , 0 , docs , false , false , false , true ) ; final com . allanbank . mongodb . Callback < com . allanbank . mongodb . bson . Document > mockCallback = createMock ( com . allanbank . mongodb . Callback . class ) ; replay ( mockCallback ) ; final com . allanbank . mongodb . client . callback . ReplyDocumentCallback callback = new com . allanbank . mongodb . client . callback . ReplyDocumentCallback ( "n" , mockCallback ) ; "<AssertPlaceHolder>" ; verify ( mockCallback ) ; } convert ( com . allanbank . mongodb . client . message . Reply ) { final java . util . List < com . allanbank . mongodb . bson . Document > results = reply . getResults ( ) ; if ( ( results . size ( ) ) == 1 ) { return results . get ( 0 ) ; } return null ; }
|
org . junit . Assert . assertNull ( callback . convert ( reply ) )
|
testGetAllChemModels_IChemFile ( ) { java . util . List < org . openscience . cdk . interfaces . IChemModel > list = org . openscience . cdk . tools . manipulator . ChemFileManipulator . getAllChemModels ( chemFile ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cells . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , list . size ( ) )
|
testListAllBases ( ) { java . util . List < com . mylab . cromero . repository . dto . BaseResponse > listaBases = new java . util . ArrayList < com . mylab . cromero . repository . dto . BaseResponse > ( ) ; when ( this . baseService . findAllBases ( ) ) . thenReturn ( listaBases ) ; java . util . List < com . mylab . cromero . repository . dto . BaseResponse > listAllBase = helloWorldController . listAllBase ( null ) ; verify ( this . baseService , times ( 1 ) ) . findAllBases ( ) ; "<AssertPlaceHolder>" ; } findAllBases ( ) { this . logger . debug ( "Begin<sp>operation:<sp>findAllBases<sp>" ) ; java . util . List < com . mylab . cromero . repository . domain . Base > findAll = baseRepository . findAll ( ) ; this . logger . debug ( "findAllBases<sp>finded<sp>" ) ; java . util . List < com . mylab . cromero . repository . dto . BaseResponse > listBases = findAll . stream ( ) . map ( com . mylab . cromero . service . mapper . LayerMapping . getBaseToBaseResponseMapperLambdaFunction ( ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; this . logger . debug ( "End<sp>operation:<sp>findAllBases<sp>{}<sp>" , listBases ) ; return listBases ; }
|
org . junit . Assert . assertTrue ( ( ( listAllBase . size ( ) ) == 0 ) )
|
testAutomappedEquals ( ) { boolean b = org . davidmoten . rx . jdbc . Database . test ( ) . select ( "select<sp>name,<sp>score<sp>from<sp>person<sp>where<sp>name=?" ) . parameterStream ( io . reactivex . Flowable . just ( "FRED" ) ) . autoMap ( org . davidmoten . rx . jdbc . DatabaseTest . Person2 . class ) . map ( ( x ) -> x . equals ( x ) ) . blockingSingle ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( org . davidmoten . rx . jdbc . tuple . Tuple6 . getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; org . davidmoten . rx . jdbc . tuple . Tuple6 < ? , ? , ? , ? , ? , ? > other = ( ( org . davidmoten . rx . jdbc . tuple . Tuple6 < ? , ? , ? , ? , ? , ? > ) ( obj ) ) ; if ( ( value1 ) == null ) { if ( ( other . value1 ) != null ) return false ; } else if ( ! ( value1 . equals ( other . value1 ) ) ) return false ; if ( ( value2 ) == null ) { if ( ( other . value2 ) != null ) return false ; } else if ( ! ( value2 . equals ( other . value2 ) ) ) return false ; if ( ( value3 ) == null ) { if ( ( other . value3 ) != null ) return false ; } else if ( ! ( value3 . equals ( other . value3 ) ) ) return false ; if ( ( value4 ) == null ) { if ( ( other . value4 ) != null ) return false ; } else if ( ! ( value4 . equals ( other . value4 ) ) ) return false ; if ( ( value5 ) == null ) { if ( ( other . value5 ) != null ) return false ; } else if ( ! ( value5 . equals ( other . value5 ) ) ) return false ; if ( ( value6 ) == null ) { if ( ( other . value6 ) != null ) return false ; } else if ( ! ( value6 . equals ( other . value6 ) ) ) return false ; return true ; }
|
org . junit . Assert . assertTrue ( b )
|
testGuestSpanishSessionWithSpanishCookieAlgorithm3 ( ) { java . lang . String prependI18nLanguageId = getPrependI18nLanguageId ( 3 , null , LocaleUtil . SPAIN , LocaleUtil . SPAIN ) ; "<AssertPlaceHolder>" ; } toLanguageId ( java . util . Locale ) { return com . liferay . portal . kernel . util . LocaleUtil . getInstance ( ) . _toLanguageId ( locale ) ; }
|
org . junit . Assert . assertEquals ( com . liferay . portal . kernel . util . LocaleUtil . toLanguageId ( LocaleUtil . SPAIN ) , prependI18nLanguageId )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.