input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
---|---|
recordOnMockInstanceButReplayOnDifferentInstance ( mockit . MockInstanceMatchingTest$Collaborator ) { thrown . expect ( mockit . MissingInvocation . class ) ; new mockit . Expectations ( ) { { verifiedMock . getValue ( ) ; result = 12 ; } } ; mockit . MockInstanceMatchingTest . Collaborator collaborator = new mockit . MockInstanceMatchingTest . Collaborator ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return strVal ; }
|
org . junit . Assert . assertEquals ( 0 , collaborator . getValue ( ) )
|
coerceToNeededCoverageSpec ( ) { java . lang . reflect . Type type = com . facebook . buck . rules . coercer . TypeCoercerTest . TestFields . class . getField ( "listOfNeededCoverageSpecs" ) . getGenericType ( ) ; com . facebook . buck . rules . coercer . TypeCoercer < ? > coercer = typeCoercerFactory . typeCoercerForType ( type ) ; com . google . common . collect . ImmutableList < ? > input = com . google . common . collect . ImmutableList . of ( com . google . common . collect . ImmutableList . of ( 0 , "//some:build-target" ) , com . google . common . collect . ImmutableList . of ( 90 , "//other/build:target" ) , com . google . common . collect . ImmutableList . of ( 100 , "//:target" , "some/path.py" ) ) ; java . lang . Object result = coercer . coerce ( cellRoots , filesystem , java . nio . file . Paths . get ( "" ) , EmptyTargetConfiguration . INSTANCE , input ) ; com . google . common . collect . ImmutableList < com . facebook . buck . rules . coercer . NeededCoverageSpec > expectedResult = com . google . common . collect . ImmutableList . of ( com . facebook . buck . rules . coercer . NeededCoverageSpec . of ( 0 , com . facebook . buck . core . model . BuildTargetFactory . newInstance ( "//some:build-target" ) , java . util . Optional . empty ( ) ) , com . facebook . buck . rules . coercer . NeededCoverageSpec . of ( 90 , com . facebook . buck . core . model . BuildTargetFactory . newInstance ( "//other/build:target" ) , java . util . Optional . empty ( ) ) , com . facebook . buck . rules . coercer . NeededCoverageSpec . of ( 100 , com . facebook . buck . core . model . BuildTargetFactory . newInstance ( "//:target" ) , java . util . Optional . of ( "some/path.py" ) ) ) ; "<AssertPlaceHolder>" ; } of ( com . facebook . buck . core . config . BuckConfig ) { return new com . facebook . buck . jvm . java . JavaBuckConfig ( delegate ) ; }
|
org . junit . Assert . assertEquals ( expectedResult , result )
|
testGetRibbonBar ( ) { mmarquee . automation . AutomationElement element = org . mockito . Mockito . mock ( mmarquee . automation . AutomationElement . class ) ; when ( element . getClassName ( ) ) . thenReturn ( AutomationRibbonBar . CLASS_NAME ) ; when ( element . getName ( ) ) . thenReturn ( "RIBBON-01" ) ; mmarquee . automation . uiautomation . IUIAutomation mocked_automation = org . mockito . Mockito . mock ( mmarquee . automation . uiautomation . IUIAutomation . class ) ; mmarquee . automation . UIAutomation instance = new mmarquee . automation . UIAutomation ( mocked_automation ) ; mmarquee . automation . pattern . ItemContainer container = org . mockito . Mockito . mock ( mmarquee . automation . pattern . ItemContainer . class ) ; mmarquee . automation . controls . AutomationRibbonBar bar = new mmarquee . automation . controls . AutomationRibbonBar ( new mmarquee . automation . controls . ElementBuilder ( element ) . addPattern ( container ) . automation ( instance ) ) ; java . lang . String name = bar . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return this . name ; }
|
org . junit . Assert . assertEquals ( name , "RIBBON-01" )
|
testTypeClass3 ( ) { com . baidu . bjf . remoting . protobuf . Codec 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 = ( ( com . baidu . bjf . remoting . protobuf . bytestest . ByteTypeClass3 ) ( 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 ( ) )
|
testGetMaxGid ( ) { com . gisgraphy . domain . geoloc . entity . OpenStreetMap streetOSM = com . gisgraphy . test . GisgraphyTestHelper . createOpenStreetMapForPeterMartinStreet ( ) ; long gid = 3456L ; streetOSM . setGid ( gid ) ; openStreetMapDao . save ( streetOSM ) ; long actual = openStreetMapDao . getMaxGid ( ) ; "<AssertPlaceHolder>" ; } getMaxGid ( ) { return ( ( java . lang . Long ) ( this . getHibernateTemplate ( ) . execute ( new org . springframework . orm . hibernate3 . HibernateCallback ( ) { public java . lang . Object doInHibernate ( org . hibernate . Session session ) throws javax . persistence . PersistenceException { java . lang . String queryString = "select<sp>max(gid)<sp>from<sp>" + ( com . gisgraphy . domain . geoloc . entity . OpenStreetMap . class . getSimpleName ( ) ) ; org . hibernate . Query qry = session . createQuery ( queryString ) ; qry . setCacheable ( true ) ; java . lang . Long count = ( ( java . lang . Long ) ( qry . uniqueResult ( ) ) ) ; return count == null ? 0 : count ; } } ) ) ) ; }
|
org . junit . Assert . assertEquals ( gid , actual )
|
shouldRemoveForAddingUser ( ) { graphStorage . put ( a , access ) ; final boolean remove = graphStorage . remove ( uk . gov . gchq . gaffer . federatedstore . FederatedGraphStorageTest . GRAPH_ID_A , testUser ) ; "<AssertPlaceHolder>" ; } remove ( java . lang . String , uk . gov . gchq . gaffer . user . User ) { graphStorage . remove ( graphId , user ) ; }
|
org . junit . Assert . assertTrue ( remove )
|
testSimpleWriteReadSignBySign ( ) { org . apache . olingo . odata2 . core . ep . util . CircleStreamBuffer csb = new org . apache . olingo . odata2 . core . ep . util . CircleStreamBuffer ( ) ; java . io . OutputStream write = csb . getOutputStream ( ) ; byte [ ] writeData = "Test" . getBytes ( "UTF-8" ) ; for ( byte element : writeData ) { write . write ( element ) ; } java . io . InputStream inStream = csb . getInputStream ( ) ; byte [ ] buffer = new byte [ 4 ] ; for ( int i = 0 ; i < ( buffer . length ) ; i ++ ) { buffer [ i ] = ( ( byte ) ( inStream . read ( ) ) ) ; } java . lang . String result = new java . lang . String ( buffer ) ; log ( ( ( "Test<sp>result<sp>=<sp>[" + result ) + "]" ) ) ; "<AssertPlaceHolder>" ; } log ( java . lang . String ) { if ( org . apache . olingo . odata2 . core . ep . util . CircleStreamBufferTest . LOG_ON ) { System . out . println ( toLog ) ; } }
|
org . junit . Assert . assertEquals ( "Test" , result )
|
testClone ( ) { org . arakhne . afc . math . geometry . d3 . continuous . Plane4f plane2 = ( ( org . arakhne . afc . math . geometry . d3 . continuous . Plane4f ) ( this . r . clone ( ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( object instanceof org . arakhne . afc . vmutil . MACNumber ) ) { return false ; } final byte [ ] bao = ( ( org . arakhne . afc . vmutil . MACNumber ) ( object ) ) . bytes ; if ( ( bao . length ) != ( this . bytes . length ) ) { return false ; } for ( int i = 0 ; i < ( bao . length ) ; ++ i ) { if ( ( bao [ i ] ) != ( this . bytes [ i ] ) ) { return false ; } } return true ; }
|
org . junit . Assert . assertTrue ( plane2 . equals ( this . r ) )
|
testContextIsSet_null ( ) { fixture . setContext ( ( ( org . eclipse . tracecompass . ctf . core . event . types . StructDeclaration ) ( null ) ) ) ; boolean result = fixture . contextIsSet ( ) ; "<AssertPlaceHolder>" ; } contextIsSet ( ) { return ( fContext ) != null ; }
|
org . junit . Assert . assertFalse ( result )
|
testJoinCase3 ( ) { com . github . zk1931 . jzab . QuorumTestCallback cb1 = new com . github . zk1931 . jzab . QuorumTestCallback ( ) ; com . github . zk1931 . jzab . QuorumTestCallback cb2 = new com . github . zk1931 . jzab . QuorumTestCallback ( ) ; com . github . zk1931 . jzab . TestStateMachine st1 = new com . github . zk1931 . jzab . TestStateMachine ( 2 ) ; com . github . zk1931 . jzab . TestStateMachine st2 = new com . github . zk1931 . jzab . TestStateMachine ( 1 ) ; final java . lang . String server1 = getUniqueHostPort ( ) ; final java . lang . String server2 = getUniqueHostPort ( ) ; com . github . zk1931 . jzab . PersistentState state1 = makeInitialState ( server1 , 0 ) ; com . github . zk1931 . jzab . PersistentState state2 = makeInitialState ( server2 , 0 ) ; com . github . zk1931 . jzab . ZabConfig config1 = new com . github . zk1931 . jzab . ZabConfig ( ) ; com . github . zk1931 . jzab . ZabConfig config2 = new com . github . zk1931 . jzab . ZabConfig ( ) ; com . github . zk1931 . jzab . Zab zab1 = new com . github . zk1931 . jzab . Zab ( st1 , config1 , server1 , server1 , state1 , cb1 , null ) ; cb1 . waitBroadcasting ( ) ; zab1 . send ( java . nio . ByteBuffer . wrap ( "req1" . getBytes ( ) ) , null ) ; com . github . zk1931 . jzab . Zab zab2 = new com . github . zk1931 . jzab . Zab ( st2 , config2 , server2 , server1 , state2 , cb2 , null ) ; cb2 . waitBroadcasting ( ) ; st2 . txnsCount . await ( ) ; zab2 . shutdown ( ) ; try { zab1 . send ( java . nio . ByteBuffer . wrap ( "req2" . getBytes ( ) ) , null ) ; } catch ( com . github . zk1931 . jzab . ZabException ex ) { com . github . zk1931 . jzab . ZabTest . LOG . debug ( "No<sp>in<sp>broadcasting<sp>phase." ) ; } boolean isCountedDown = st1 . txnsCount . await ( 500 , TimeUnit . MILLISECONDS ) ; "<AssertPlaceHolder>" ; st2 . txnsCount . await ( ) ; zab1 . shutdown ( ) ; } send ( java . nio . ByteBuffer , java . lang . Object ) { this . mainThread . send ( request , ctx ) ; }
|
org . junit . Assert . assertFalse ( isCountedDown )
|
testParseHeadingBlocksMultiple ( ) { com . liferay . wiki . engine . creole . internal . parser . ast . WikiPageNode wikiPageNode = getWikiPageNode ( "heading-10.creole" ) ; "<AssertPlaceHolder>" ; } getChildASTNodesCount ( ) { return _collectionNode . size ( ) ; }
|
org . junit . Assert . assertEquals ( 3 , wikiPageNode . getChildASTNodesCount ( ) )
|
testMaxWidthPerNodeDefault ( ) { org . apache . drill . test . ClusterFixtureBuilder builder = org . apache . drill . test . ClusterFixture . bareBuilder ( dirTestWatcher ) . setOptionDefault ( ExecConstants . CPU_LOAD_AVERAGE_KEY , 0.7 ) ; try ( org . apache . drill . test . ClusterFixture cluster = builder . build ( ) ; org . apache . drill . test . ClientFixture client = cluster . clientFixture ( ) ) { long maxWidth = ExecConstants . MAX_WIDTH_PER_NODE . computeMaxWidth ( 0.7 , 0 ) ; int availProc = java . lang . Runtime . getRuntime ( ) . availableProcessors ( ) ; long maxWidthPerNode = java . lang . Math . max ( 1 , java . lang . Math . min ( availProc , java . lang . Math . round ( ( availProc * 0.7 ) ) ) ) ; "<AssertPlaceHolder>" ; } } computeMaxWidth ( double , long ) { if ( maxWidth != 0 ) { return ( ( int ) ( maxWidth ) ) ; } else { int availProc = java . lang . Runtime . getRuntime ( ) . availableProcessors ( ) ; long maxWidthPerNode = java . lang . Math . max ( 1 , java . lang . Math . min ( availProc , java . lang . Math . round ( ( availProc * cpuLoadAverage ) ) ) ) ; return ( ( int ) ( maxWidthPerNode ) ) ; } }
|
org . junit . Assert . assertEquals ( maxWidthPerNode , maxWidth )
|
quoted_cr_eof ( ) { java . util . List < java . lang . String > results = parse ( "\'\r" ) ; "<AssertPlaceHolder>" ; } contains ( E [ ] ) { return org . hamcrest . Matchers . Matchers . contains ( items ) ; }
|
org . junit . Assert . assertThat ( results , contains ( "\'\r" ) )
|
shouldHandleConsumerLambda ( ) { org . junit . Assume . assumeThat ( version , org . hamcrest . Matchers . either ( org . hamcrest . core . StringStartsWith . startsWith ( "v2" ) ) . or ( org . hamcrest . core . StringStartsWith . startsWith ( "v3" ) ) ) ; final org . apache . tinkerpop . gremlin . util . function . Lambda o = ( ( org . apache . tinkerpop . gremlin . util . function . Lambda ) ( org . apache . tinkerpop . gremlin . util . function . Lambda . consumer ( "x<sp>-><sp>x" ) ) ) ; "<AssertPlaceHolder>" ; } serializeDeserialize ( org . apache . tinkerpop . shaded . jackson . databind . ObjectMapper , java . lang . Object , java . lang . Class ) { try ( final java . io . ByteArrayOutputStream stream = new java . io . ByteArrayOutputStream ( ) ) { mapper . writeValue ( stream , o ) ; try ( final java . io . InputStream inputStream = new java . io . ByteArrayInputStream ( stream . toByteArray ( ) ) ) { return mapper . readValue ( inputStream , clazz ) ; } } }
|
org . junit . Assert . assertEquals ( o , serializeDeserialize ( mapper , o , org . apache . tinkerpop . gremlin . util . function . Lambda . class ) )
|
testSort ( ) { java . util . List < io . fabric8 . api . VersionSequence > list = versions ( "1.15" , "1.5" , "1.0.10" , "1.0" , "1.0.5" ) ; java . util . Collections . sort ( list ) ; "<AssertPlaceHolder>" ; } sort ( java . util . Collection ) { java . util . Set < java . lang . String > namespaces = new java . util . HashSet ( ) ; for ( org . osgi . resource . Resource r : resources ) { for ( org . osgi . resource . Capability cap : r . getCapabilities ( null ) ) { namespaces . add ( cap . getNamespace ( ) ) ; } } io . fabric8 . agent . resolver . CapabilitySet capSet = new io . fabric8 . agent . resolver . CapabilitySet ( new java . util . ArrayList ( namespaces ) ) ; for ( org . osgi . resource . Resource r : resources ) { for ( org . osgi . resource . Capability cap : r . getCapabilities ( null ) ) { capSet . addCapability ( cap ) ; } } java . util . Set < T > sorted = new java . util . LinkedHashSet ( ) ; java . util . Set < T > visited = new java . util . LinkedHashSet ( ) ; for ( T r : resources ) { io . fabric8 . agent . service . RequirementSort . visit ( r , visited , sorted , capSet ) ; } return sorted ; }
|
org . junit . Assert . assertEquals ( versions ( "1.0" , "1.0.5" , "1.0.10" , "1.5" , "1.15" ) , list )
|
shouldAllowIteratorToBeUsedNominally ( ) { javax . jcr . Node cars = session . getNode ( "/Cars" ) ; javax . jcr . NodeIterator iter = cars . getNodes ( ) ; while ( iter . hasNext ( ) ) { javax . jcr . Node child = iter . nextNode ( ) ; "<AssertPlaceHolder>" ; } } nextNode ( ) { org . modeshape . jcr . cache . CachedNode cachedNode = moveToNextRow ( ) . getNode ( defaultSelectorIndex ) ; return context . getNode ( cachedNode ) ; }
|
org . junit . Assert . assertNotNull ( child )
|
testSeveralSegments ( ) { org . apache . commons . math . geometry . euclidean . twod . SubLine twoSubs = new org . apache . commons . math . geometry . euclidean . twod . SubLine ( new org . apache . commons . math . geometry . euclidean . twod . Line ( new org . apache . commons . math . geometry . euclidean . twod . Vector2D ( ( - 1 ) , ( - 7 ) ) , new org . apache . commons . math . geometry . euclidean . twod . Vector2D ( 7 , ( - 1 ) ) ) , new org . apache . commons . math . geometry . partitioning . RegionFactory < org . apache . commons . math . geometry . euclidean . oned . Euclidean1D > ( ) . union ( new org . apache . commons . math . geometry . euclidean . oned . IntervalsSet ( 1 , 2 ) , new org . apache . commons . math . geometry . euclidean . oned . IntervalsSet ( 3 , 4 ) ) ) ; java . util . List < org . apache . commons . math . geometry . euclidean . twod . Segment > segments = twoSubs . getSegments ( ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( operations ) == 0 ) return ingredients ; if ( ( ingredients ) == 0 ) return operations ; return ( operations ) * ( ingredients ) ; }
|
org . junit . Assert . assertEquals ( 2 , segments . size ( ) )
|
testGetImageBoundsForTreeColumn ( ) { org . eclipse . swt . widgets . TreeItem_Test . createColumns ( tree , 1 ) ; org . eclipse . swt . widgets . TreeItem treeItem = new org . eclipse . swt . widgets . TreeItem ( tree , org . eclipse . swt . SWT . NONE ) ; treeItem . setImage ( 1 , createImage ( display , Fixture . IMAGE1 ) ) ; "<AssertPlaceHolder>" ; } getImageBounds ( int ) { checkWidget ( ) ; if ( ! ( parent . checkData ( this , this . index ) ) ) { error ( SWT . ERROR_WIDGET_DISPOSED ) ; } org . eclipse . swt . graphics . Rectangle result = null ; int validColumnCount = java . lang . Math . max ( 1 , parent . columnHolder . size ( ) ) ; if ( ( 0 <= index ) && ( index < validColumnCount ) ) { result = new org . eclipse . swt . graphics . Rectangle ( 0 , 0 , 0 , 0 ) ; org . eclipse . swt . graphics . Point size = parent . getItemImageSize ( index ) ; result . width = size . x ; result . height = size . y ; result . x = parent . getVisualCellLeft ( this , index ) ; if ( ! ( parent . isTreeColumn ( index ) ) ) { result . x += parent . getCellPadding ( ) . left ; } result . y = getItemTop ( ) ; } else { result = new org . eclipse . swt . graphics . Rectangle ( 0 , 0 , 0 , 0 ) ; } return result ; }
|
org . junit . Assert . assertEquals ( treeItem . getImageBounds ( 0 ) . x , tree . getVisualCellLeft ( treeItem , 0 ) )
|
testLongParseDefaultSuccess ( ) { long num = com . rometools . rome . io . impl . NumberParser . parseLong ( "Non<sp>Long" , 1L ) ; "<AssertPlaceHolder>" ; } parseLong ( java . lang . String , long ) { final java . lang . Long ret = com . rometools . rome . io . impl . NumberParser . parseLong ( str ) ; if ( ret == null ) { return def ; } else { return ret . longValue ( ) ; } }
|
org . junit . Assert . assertEquals ( 1L , num )
|
textSummaryNullTest ( ) { java . lang . String text = org . oscarehr . e2e . model . export . body . EncountersModelTest . nullEncountersModel . getTextSummary ( ) ; "<AssertPlaceHolder>" ; } getTextSummary ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ( familyHistory . getFamilyHistory ( ) . getObservation_date ( ) ) != null ) { sb . append ( familyHistory . getFamilyHistory ( ) . getObservation_date ( ) ) ; } if ( ! ( org . oscarehr . e2e . util . EverestUtils . isNullorEmptyorWhitespace ( familyHistory . getFamilyHistory ( ) . getNote ( ) ) ) ) { sb . append ( "<sp>" . concat ( familyHistory . getFamilyHistory ( ) . getNote ( ) . replaceAll ( "\\\\n" , "\n" ) ) ) ; } return sb . toString ( ) ; }
|
org . junit . Assert . assertNotNull ( text )
|
testGetHeaders ( ) { final java . util . Map < java . lang . String , java . lang . String > ht = new java . util . Hashtable < java . lang . String , java . lang . String > ( ) ; ht . put ( "X-Foo" , "Bar" ) ; ht . put ( "X-Int" , "1" ) ; email . setHeaders ( ht ) ; "<AssertPlaceHolder>" ; } getHeaders ( ) { return this . headers ; }
|
org . junit . Assert . assertEquals ( ht . size ( ) , email . getHeaders ( ) . size ( ) )
|
givenString_Uploaded_StringInfoIsAvailable ( ) { org . jets3t . service . model . S3Bucket bucket = createBucket ( ) ; "<AssertPlaceHolder>" ; uploadStringData ( ) ; org . jets3t . service . model . StorageObject objectDetailsOnly = com . baeldung . jets3t . JetS3tLiveTest . s3Service . getObjectDetails ( com . baeldung . jets3t . JetS3tLiveTest . BucketName , com . baeldung . jets3t . JetS3tLiveTest . TestStringName ) ; log . info ( ( ( ( "Content<sp>type:<sp>" + ( objectDetailsOnly . getContentType ( ) ) ) + "<sp>length:<sp>" ) + ( objectDetailsOnly . getContentLength ( ) ) ) ) ; deleteObject ( com . baeldung . jets3t . JetS3tLiveTest . TestStringName ) ; deleteBucket ( ) ; }
|
org . junit . Assert . assertNotNull ( bucket )
|
alternativeVia_persistCascadeOff_with_commitAndContinue ( ) { org . tests . model . m2m . MnyC c = new org . tests . model . m2m . MnyC ( ) ; c . setId ( Long . MAX_VALUE ) ; org . tests . model . m2m . MnyB b = new org . tests . model . m2m . MnyB ( ) ; b . getCs ( ) . add ( c ) ; io . ebean . Transaction transaction = io . ebean . Ebean . beginTransaction ( ) ; try { transaction . setPersistCascade ( false ) ; b . save ( ) ; transaction . commitAndContinue ( ) ; try { transaction . setPersistCascade ( true ) ; b . save ( ) ; transaction . commit ( ) ; } catch ( javax . persistence . PersistenceException e ) { org . tests . transaction . TestBeanStateReset . logger . info ( ( "The<sp>ManyToMany<sp>intersection<sp>error:<sp>" + ( e . getMessage ( ) ) ) ) ; } } finally { transaction . end ( ) ; } org . tests . model . m2m . MnyB madeIt = io . ebean . Ebean . find ( org . tests . model . m2m . MnyB . class , b . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
|
org . junit . Assert . assertNotNull ( madeIt )
|
resolveTest ( ) { co . cask . coopr . store . entity . EntityStoreView view = entityStoreService . getView ( co . cask . coopr . http . ADMIN_ACCOUNT ) ; java . lang . ClassLoader classLoader = co . cask . coopr . http . AdminHandlerTest . class . getClassLoader ( ) ; java . io . InputStream partialSensuIn = classLoader . getResourceAsStream ( "partials/sensu-partial.json" ) ; java . io . InputStream clusterInsecureIn = classLoader . getResourceAsStream ( "partials/cdap-distributed-insecure.json" ) ; co . cask . coopr . spec . template . PartialTemplate partial = gson . fromJson ( org . apache . commons . io . IOUtils . toString ( partialSensuIn ) , co . cask . coopr . spec . template . PartialTemplate . class ) ; co . cask . coopr . spec . template . ClusterTemplate basic = gson . fromJson ( org . apache . commons . io . IOUtils . toString ( clusterInsecureIn ) , co . cask . coopr . spec . template . ClusterTemplate . class ) ; view . writePartialTemplate ( partial ) ; view . writeClusterTemplate ( basic ) ; java . io . InputStream clusterDistributedResolvedIn = classLoader . getResourceAsStream ( "partials/cdap-distributed-resolved.json" ) ; co . cask . coopr . spec . template . ClusterTemplate expected = gson . fromJson ( org . apache . commons . io . IOUtils . toString ( clusterDistributedResolvedIn , Charsets . UTF_8 ) , co . cask . coopr . spec . template . ClusterTemplate . class ) ; java . io . InputStream clusterDistributedIn = classLoader . getResourceAsStream ( "partials/cdap-distributed.json" ) ; org . apache . http . HttpResponse response = doPostExternalAPI ( "/resolve" , org . apache . commons . io . IOUtils . toString ( clusterDistributedIn ) , co . cask . coopr . http . ADMIN_HEADERS ) ; java . io . Reader reader = new java . io . InputStreamReader ( response . getEntity ( ) . getContent ( ) , com . google . common . base . Charsets . UTF_8 ) ; co . cask . coopr . spec . template . ClusterTemplate actual = gson . fromJson ( reader , co . cask . coopr . spec . template . ClusterTemplate . class ) ; "<AssertPlaceHolder>" ; } doPostExternalAPI ( java . lang . String , java . lang . String , org . apache . http . Header [ ] ) { return co . cask . coopr . http . ServiceTestBase . doPost ( resource , body , headers , co . cask . coopr . http . ServiceTestBase . externalBase ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
toJson ( ) { java . lang . String expected = "{\"accessControlType\":\"READ_ONLY\",\"connectionType\":\"DIRECT\",\"databasePrefix\":\"name_\",\"federationType\":\"FEDERATED\",\"latency\":0,\"mappedDatabases\":[],\"metastoreTunnel\":null,\"name\":\"name\",\"remoteMetaStoreUris\":\"uri\",\"status\":\"UNKNOWN\",\"writableDatabaseWhiteList\":[]}" ; com . fasterxml . jackson . databind . ObjectMapper mapper = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; mapper . enable ( com . fasterxml . jackson . databind . MapperFeature . SORT_PROPERTIES_ALPHABETICALLY ) ; java . lang . String json = mapper . writerFor ( com . hotels . bdp . waggledance . api . model . FederatedMetaStore . class ) . writeValueAsString ( metaStore ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertThat ( json , org . hamcrest . CoreMatchers . is ( expected ) )
|
testIsSupportedKeyTypeFailsForUnsupportedKeyAlgorithm ( ) { java . security . PublicKey key = org . eclipse . californium . scandium . dtls . DtlsTestTools . getClientPublicKey ( ) ; org . eclipse . californium . scandium . dtls . CertificateRequest req = new org . eclipse . californium . scandium . dtls . CertificateRequest ( org . eclipse . californium . scandium . dtls . CertificateRequestTest . peerAddress ) ; req . addCertificateType ( ClientCertificateType . DSS_FIXED_DH ) ; "<AssertPlaceHolder>" ; } isSupportedKeyType ( java . security . cert . X509Certificate ) { for ( org . eclipse . californium . scandium . dtls . CertificateRequest . ClientCertificateType type : certificateTypes ) { boolean isCompatibleType = type . isCompatibleWithKeyAlgorithm ( cert . getPublicKey ( ) . getAlgorithm ( ) ) ; boolean meetsSigningRequirements = ( ! ( type . requiresSigningCapability ( ) ) ) || ( ( ( type . requiresSigningCapability ( ) ) && ( ( cert . getKeyUsage ( ) ) != null ) ) && ( cert . getKeyUsage ( ) [ 0 ] ) ) ; org . eclipse . californium . scandium . dtls . CertificateRequest . LOGGER . log ( Level . FINER , "type:<sp>{0},<sp>isCompatibleWithKeyAlgorithm[{1}]:<sp>{2},<sp>meetsSigningRequirements:<sp>{3}" , new java . lang . Object [ ] { type , cert . getPublicKey ( ) . getAlgorithm ( ) , isCompatibleType , meetsSigningRequirements } ) ; if ( isCompatibleType && meetsSigningRequirements ) { return true ; } } org . eclipse . californium . scandium . dtls . CertificateRequest . LOGGER . log ( Level . FINER , "certificate<sp>[{0}]<sp>is<sp>not<sp>of<sp>any<sp>supported<sp>type" , cert ) ; return false ; }
|
org . junit . Assert . assertFalse ( req . isSupportedKeyType ( key ) )
|
testPropagateWhenAddingUserToRequiredOrganizations ( ) { com . liferay . portal . security . membership . policy . test . util . MembershipPolicyTestUtil . addUser ( addRequiredOrganizations ( ) , null , null , null ) ; "<AssertPlaceHolder>" ; } isPropagateMembership ( ) { return com . liferay . portal . security . membership . policy . BaseMembershipPolicyTestCase . _propagateMembership ; }
|
org . junit . Assert . assertTrue ( isPropagateMembership ( ) )
|
createFreemarkerPortlet ( ) { java . lang . String packageName = "test.freemarker.portlet.gradle" ; wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareGradle ( project . getName ( ) , com . liferay . ide . ui . portlet . tests . FREEMARKER_PORTLET ) ; wizardAction . next ( ) ; wizardAction . newModuleInfo . preparePackageName ( packageName ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningProjectBuildingJobs ( ) ; java . lang . String [ ] projectNames = new java . lang . String [ ] { com . liferay . ide . ui . portlet . tests . NewPortletModuleLiferayWorkspaceGradleTests . liferayWorkspace . getName ( ) , "modules" , project . getName ( ) } ; "<AssertPlaceHolder>" ; viewAction . project . closeAndDeleteFromDisk ( projectNames ) ; } 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 ( projectNames ) )
|
testDilation_Square4x4 ( ) { ij . process . ImageProcessor image = createImage_Square4x4 ( ) ; inra . ijpb . morphology . Strel strel = new inra . ijpb . morphology . strel . DiamondStrel ( 5 ) ; ij . process . ImageProcessor expected = image . createProcessor ( 10 , 10 ) ; for ( int x = 3 ; x < 7 ; x ++ ) { expected . set ( x , 1 , 255 ) ; expected . set ( x , 8 , 255 ) ; } for ( int x = 2 ; x < 8 ; x ++ ) { expected . set ( x , 2 , 255 ) ; expected . set ( x , 7 , 255 ) ; } for ( int y = 3 ; y < 7 ; y ++ ) { for ( int x = 1 ; x < 9 ; x ++ ) { expected . set ( x , y , 255 ) ; } } ij . process . ImageProcessor result = strel . dilation ( image ) ; for ( int y = 0 ; y < ( image . getHeight ( ) ) ; y ++ ) { for ( int x = 0 ; x < ( image . getWidth ( ) ) ; x ++ ) { int exp = expected . get ( x , y ) ; int res = result . get ( x , y ) ; if ( ( expected . get ( x , y ) ) != ( result . get ( x , y ) ) ) { System . out . println ( ( ( ( ( ( ( ( "At<sp>x=" + x ) + "<sp>and<sp>y=" ) + y ) + ",<sp>exp=" ) + exp ) + "<sp>and<sp>res<sp>=<sp>" ) + res ) ) ; } "<AssertPlaceHolder>" ; } } } get ( int , int ) { if ( x < 0 ) return ( ( int ) ( this . value ) ) ; if ( y < 0 ) return ( ( int ) ( this . value ) ) ; if ( x >= ( this . image . getWidth ( ) ) ) return ( ( int ) ( this . value ) ) ; if ( y >= ( this . image . getHeight ( ) ) ) return ( ( int ) ( this . value ) ) ; return this . image . get ( x , y ) ; }
|
org . junit . Assert . assertEquals ( exp , res )
|
testDeselectAllOptions ( ) { wd . open ( org . finra . jtaf . ewd . widget . element . html . SelectTest . url ) ; org . finra . jtaf . ewd . widget . element . html . Select s = new org . finra . jtaf . ewd . widget . element . html . Select ( selectMultipleLocator ) ; s . selectOption ( "Car" ) ; s . selectOption ( "Truck" ) ; s . deselectAllOptions ( ) ; "<AssertPlaceHolder>" ; } getSelectedOption ( ) { try { org . finra . jtaf . ewd . widget . element . html . Select select = new org . finra . jtaf . ewd . widget . element . html . Select ( getByLocator ( ) ) ; java . util . List < java . lang . String > selectedOptions = select . getSelectedOptions ( ) ; if ( ( selectedOptions != null ) && ( ( selectedOptions . size ( ) ) > 0 ) ) { return selectedOptions . get ( 0 ) ; } else { return "" ; } } catch ( java . lang . Exception e ) { throw new org . finra . jtaf . ewd . widget . WidgetException ( "Error<sp>while<sp>fetching<sp>selected<sp>options" , getByLocator ( ) , e ) ; } }
|
org . junit . Assert . assertEquals ( null , s . getSelectedOption ( ) )
|
failFourYearsValidation ( ) { org . raml . yagi . framework . util . DateUtils . FOUR_YEARS_VALIDATION = true ; org . raml . yagi . framework . util . DateUtils . setFormatters ( ) ; org . raml . v2 . api . RamlModelResult ramlModelResult = getDateTimeApi ( ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return ! ( validationResults . isEmpty ( ) ) ; }
|
org . junit . Assert . assertThat ( ramlModelResult . hasErrors ( ) , org . hamcrest . CoreMatchers . is ( true ) )
|
runTestExceptions2 ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "GeneralJava/Exceptions2.apk" ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( this . results ) == null ? 0 : this . results . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , res . size ( ) )
|
testGetGlobal ( ) { java . lang . String out = ( ( java . lang . String ) ( run ( "CONFIG_GET('GLOBAL')" , context ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > actual = toJSONObject ( out ) ; java . util . Map < java . lang . String , java . lang . Object > expected = toJSONObject ( org . apache . metron . management . ConfigurationFunctionsTest . goodGlobalConfig ) ; "<AssertPlaceHolder>" ; } toJSONObject ( java . lang . Object ) { return ( ( org . json . simple . JSONObject ) ( org . apache . metron . common . utils . JSONUtils . _parser . get ( ) . parse ( toJSON ( o , false ) ) ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
makeSureSuiteIsCalled ( ) { org . junit . tests . junit3compatibility . SuiteMethodTest . wasRun = false ; org . junit . runner . JUnitCore . runClasses ( org . junit . tests . junit3compatibility . SuiteMethodTest . OldTest . class ) ; "<AssertPlaceHolder>" ; } runClasses ( java . lang . Class [ ] ) { return org . junit . runner . JUnitCore . runClasses ( org . junit . runner . JUnitCore . defaultComputer ( ) , classes ) ; }
|
org . junit . Assert . assertTrue ( org . junit . tests . junit3compatibility . SuiteMethodTest . wasRun )
|
createICEFaces ( ) { wizardAction . openNewLiferayJsfProjectWizard ( ) ; wizardAction . newLiferayJsf . prepareGradle ( project . getName ( ) , com . liferay . ide . ui . jsf . tests . ICEFACES ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningJobs ( ) ; "<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 ( ) ) )
|
testCopyFormatAttributesWithKeywordsAsString ( ) { org . sonatype . nexus . repository . npm . internal . NpmFormatAttributesExtractor underTest = new org . sonatype . nexus . repository . npm . internal . NpmFormatAttributesExtractor ( new ImmutableMap . Builder < java . lang . String , java . lang . Object > ( ) . put ( "keywords" , "one" ) . build ( ) ) ; underTest . copyFormatAttributes ( asset ) ; "<AssertPlaceHolder>" ; } formatAttributes ( ) { return component . formatAttributes ( ) ; }
|
org . junit . Assert . assertThat ( asset . formatAttributes ( ) . get ( "keywords" ) , org . hamcrest . Matchers . is ( "one" ) )
|
testFlattenReferenceImpl ( ) { @ org . apache . drill . exec . physical . impl . flatten . SuppressWarnings ( "unchecked" ) java . util . List < org . apache . drill . exec . util . JsonStringHashMap < java . lang . String , java . lang . Object > > data = org . apache . drill . shaded . guava . com . google . common . collect . Lists . newArrayList ( mapOf ( "a" , 1 , "b" , 2 , "list_col" , listOf ( 10 , 9 ) , "nested_list_col" , listOf ( listOf ( 100 , 99 ) , listOf ( 1000 , 999 ) ) ) ) ; java . util . List < org . apache . drill . exec . util . JsonStringHashMap < java . lang . String , java . lang . Object > > result = flatten ( flatten ( flatten ( data , "list_col" ) , "nested_list_col" ) , "nested_list_col" ) ; @ org . apache . drill . exec . physical . impl . flatten . SuppressWarnings ( "unchecked" ) java . util . List < org . apache . drill . exec . util . JsonStringHashMap < java . lang . String , java . lang . Object > > expectedResult = org . apache . drill . shaded . guava . com . google . common . collect . Lists . newArrayList ( mapOf ( "nested_list_col" , 100 , "list_col" , 10 , "a" , 1 , "b" , 2 ) , mapOf ( "nested_list_col" , 99 , "list_col" , 10 , "a" , 1 , "b" , 2 ) , mapOf ( "nested_list_col" , 1000 , "list_col" , 10 , "a" , 1 , "b" , 2 ) , mapOf ( "nested_list_col" , 999 , "list_col" , 10 , "a" , 1 , "b" , 2 ) , mapOf ( "nested_list_col" , 100 , "list_col" , 9 , "a" , 1 , "b" , 2 ) , mapOf ( "nested_list_col" , 99 , "list_col" , 9 , "a" , 1 , "b" , 2 ) , mapOf ( "nested_list_col" , 1000 , "list_col" , 9 , "a" , 1 , "b" , 2 ) , mapOf ( "nested_list_col" , 999 , "list_col" , 9 , "a" , 1 , "b" , 2 ) ) ; int i = 0 ; for ( org . apache . drill . exec . util . JsonStringHashMap < java . lang . String , java . lang . Object > record : result ) { "<AssertPlaceHolder>" ; i ++ ; } } get ( int ) { return getObject ( index ) ; }
|
org . junit . Assert . assertEquals ( record , expectedResult . get ( i ) )
|
testSourceImageFile ( ) { final java . lang . String pathname = edu . illinois . library . cantaloupe . config . Configuration . getInstance ( ) . getString ( Key . FILESYSTEMCACHE_PATHNAME ) ; final edu . illinois . library . cantaloupe . image . Identifier identifier = new edu . illinois . library . cantaloupe . image . Identifier ( "cats_~!@#$%^&*()" ) ; final java . nio . file . Path expected = java . nio . file . Paths . get ( pathname , "source" , edu . illinois . library . cantaloupe . cache . FilesystemCache . FilesystemCache . hashedPathFragment ( identifier . toString ( ) ) , edu . illinois . library . cantaloupe . util . StringUtils . md5 ( identifier . toString ( ) ) ) ; "<AssertPlaceHolder>" ; } sourceImageFile ( edu . illinois . library . cantaloupe . image . Identifier ) { return edu . illinois . library . cantaloupe . cache . FilesystemCache . rootSourceImagePath ( ) . resolve ( edu . illinois . library . cantaloupe . cache . FilesystemCache . hashedPathFragment ( identifier . toString ( ) ) ) . resolve ( edu . illinois . library . cantaloupe . util . StringUtils . md5 ( identifier . toString ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( expected , sourceImageFile ( identifier ) )
|
testBuildSuccessResponseNotNull ( ) { com . google . gson . JsonObject response = com . cognizant . devops . platformservice . rest . util . PlatformServiceUtil . buildSuccessResponse ( ) ; "<AssertPlaceHolder>" ; } buildSuccessResponse ( ) { com . google . gson . JsonObject jsonResponse = new com . google . gson . JsonObject ( ) ; jsonResponse . addProperty ( PlatformServiceConstants . STATUS , PlatformServiceConstants . SUCCESS ) ; return jsonResponse ; }
|
org . junit . Assert . assertNotNull ( response )
|
testXSSScan ( ) { net . continuumsecurity . restyburp . ScanQueueMap sq ; driver . get ( HOMEPAGE ) ; driver . get ( LOGINPAGE ) ; login ( "bob" , "password" ) ; driver . get ( SEARCHPAGE ) ; net . continuumsecurity . restyburp . BurpServiceTest . burp . setConfig ( new net . continuumsecurity . burpclient . ScanPolicy ( ) . enableXSS ( ) . getPolicy ( ) ) ; net . continuumsecurity . restyburp . BurpServiceTest . burp . scan ( SEARCHPAGE ) ; while ( ( net . continuumsecurity . restyburp . BurpServiceTest . burp . getPercentageComplete ( ) ) < 100 ) { net . continuumsecurity . restyburp . BurpServiceTest . log . debug ( ( "Complete:<sp>" + ( net . continuumsecurity . restyburp . BurpServiceTest . burp . getPercentageComplete ( ) ) ) ) ; java . lang . Thread . sleep ( 2000 ) ; } for ( net . continuumsecurity . restyburp . model . ScanIssueBean issue : net . continuumsecurity . restyburp . BurpServiceTest . burp . getIssues ( ) ) { net . continuumsecurity . restyburp . BurpServiceTest . log . debug ( ( ( ( "Issue:<sp>" + ( issue . getIssueName ( ) ) ) + "<sp>in<sp>" ) + ( issue . getUrl ( ) ) ) ) ; } "<AssertPlaceHolder>" ; } getIssues ( ) { java . util . List < net . continuumsecurity . restyburp . model . ScanIssueBean > issues = new java . util . ArrayList < net . continuumsecurity . restyburp . model . ScanIssueBean > ( ) ; for ( java . lang . String key : getUrls ( ) ) { net . continuumsecurity . restyburp . ScanQueueMap . log . debug ( ( "<sp>Getting<sp>issues<sp>for:<sp>" + key ) ) ; for ( burp . IScanQueueItem scanQueue : getQueue ( key ) ) { net . continuumsecurity . restyburp . ScanQueueMap . log . debug ( ( ( "<sp>ScanQueueItem<sp>has<sp>" + ( scanQueue . getIssues ( ) . length ) ) + "<sp>issues." ) ) ; for ( burp . IScanIssue issue : scanQueue . getIssues ( ) ) { net . continuumsecurity . restyburp . ScanQueueMap . log . debug ( ( "<sp>Found<sp>issue,<sp>adding:<sp>" + ( issue . getIssueName ( ) ) ) ) ; issues . add ( new net . continuumsecurity . restyburp . model . ScanIssueBean ( issue ) ) ; } } } return issues ; }
|
org . junit . Assert . assertEquals ( 1 , net . continuumsecurity . restyburp . BurpServiceTest . burp . getIssues ( ) . size ( ) )
|
shouldPreserveOriginalExceptionMessageWhenWrap ( ) { final java . lang . String message = "someMessage" ; java . lang . Exception e = new java . lang . IllegalArgumentException ( message ) ; java . lang . Exception result = ro . isdc . wro . WroRuntimeException . wrap ( e ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return this . message ; }
|
org . junit . Assert . assertEquals ( e . getMessage ( ) , result . getMessage ( ) )
|
testFindByProviderIdAndProviderUserIds ( ) { setupUserSocialConnectionList ( ) ; java . util . Set < java . lang . String > providerUserIds = new java . util . HashSet < java . lang . String > ( ) ; providerUserIds . add ( "google-jiwhiz" ) ; providerUserIds . add ( "google-jiwhiz2" ) ; java . util . List < com . jiwhiz . domain . account . UserSocialConnection > result = userSocialConnectionRepository . findByProviderIdAndProviderUserIdIn ( "google" , providerUserIds ) ; "<AssertPlaceHolder>" ; } setupUserSocialConnectionList ( ) { com . jiwhiz . domain . account . UserSocialConnection userSocialConnection = new com . jiwhiz . domain . account . UserSocialConnection ( "jiwhiz" , "google" , "google-jiwhiz" , 1 , "twitter-jiwhiz2" 5 , "http://" , "http://" , "twitter-jiwhiz2" 1 , "secret" , "twitter-jiwhiz2" 1 , 1000000L ) ; userSocialConnectionRepository . save ( userSocialConnection ) ; userSocialConnection = new com . jiwhiz . domain . account . UserSocialConnection ( "jiwhiz2" , "google" , "twitter-jiwhiz2" 3 , 2 , "twitter-jiwhiz2" 5 , "http://" , "http://" , "twitter-jiwhiz2" 1 , "secret" , "twitter-jiwhiz2" 1 , 1000000L ) ; userSocialConnectionRepository . save ( userSocialConnection ) ; userSocialConnection = new com . jiwhiz . domain . account . UserSocialConnection ( "jiwhiz" , "twitter-jiwhiz2" 6 , "twitter-jiwhiz2" 2 , 1 , "twitter-jiwhiz2" 5 , "http://" , "http://" , "twitter-jiwhiz2" 1 , "secret" , "twitter-jiwhiz2" 1 , 1000000L ) ; userSocialConnectionRepository . save ( userSocialConnection ) ; userSocialConnection = new com . jiwhiz . domain . account . UserSocialConnection ( "jiwhiz2" , "twitter-jiwhiz2" 6 , "facebook-jiwhiz2" , 1 , "twitter-jiwhiz2" 5 , "http://" , "http://" , "twitter-jiwhiz2" 1 , "secret" , "twitter-jiwhiz2" 1 , 1000000L ) ; userSocialConnectionRepository . save ( userSocialConnection ) ; userSocialConnection = new com . jiwhiz . domain . account . UserSocialConnection ( "jiwhiz" , "twitter-jiwhiz2" 7 , "twitter-jiwhiz2" 0 , 1 , "twitter-jiwhiz2" 5 , "http://" , "http://" , "twitter-jiwhiz2" 1 , "secret" , "twitter-jiwhiz2" 1 , 1000000L ) ; userSocialConnectionRepository . save ( userSocialConnection ) ; userSocialConnection = new com . jiwhiz . domain . account . UserSocialConnection ( "jiwhiz2" , "twitter-jiwhiz2" 7 , "twitter-jiwhiz2" , 1 , "twitter-jiwhiz2" 5 , "http://" , "http://" , "twitter-jiwhiz2" 1 , "secret" , "twitter-jiwhiz2" 1 , 1000000L ) ; userSocialConnectionRepository . save ( userSocialConnection ) ; userSocialConnection = new com . jiwhiz . domain . account . UserSocialConnection ( "other" , "twitter-jiwhiz2" 6 , "twitter-jiwhiz2" 4 , 1 , "twitter-jiwhiz2" 5 , "http://" , "http://" , "twitter-jiwhiz2" 1 , "secret" , "twitter-jiwhiz2" 1 , 1000000L ) ; userSocialConnectionRepository . save ( userSocialConnection ) ; userSocialConnection = new com . jiwhiz . domain . account . UserSocialConnection ( "other" , "twitter-jiwhiz2" 7 , "twitter-other" , 1 , "twitter-jiwhiz2" 5 , "http://" , "http://" , "twitter-jiwhiz2" 1 , "secret" , "twitter-jiwhiz2" 1 , 1000000L ) ; userSocialConnectionRepository . save ( userSocialConnection ) ; }
|
org . junit . Assert . assertEquals ( 2 , result . size ( ) )
|
assertItemIsBeingDisposedOnRemove ( ) { org . eclipse . smarthome . core . items . GenericItem item = spy ( new org . eclipse . smarthome . core . library . items . SwitchItem ( "Item1" ) ) ; itemProvider . add ( item ) ; @ org . eclipse . smarthome . core . items . SuppressWarnings ( "unchecked" ) org . eclipse . smarthome . core . common . registry . RegistryChangeListener < org . eclipse . smarthome . core . items . Item > registryChangeListener = mock ( org . eclipse . smarthome . core . common . registry . RegistryChangeListener . class ) ; itemRegistry . addRegistryChangeListener ( registryChangeListener ) ; itemProvider . remove ( item . getUID ( ) ) ; verify ( item ) . dispose ( ) ; org . mockito . ArgumentCaptor < org . eclipse . smarthome . core . items . Item > itemCaptor = org . mockito . ArgumentCaptor . forClass ( org . eclipse . smarthome . core . items . Item . class ) ; verify ( registryChangeListener ) . removed ( itemCaptor . capture ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertTrue ( ( ( itemCaptor . getValue ( ) ) == item ) )
|
testSignature ( ) { org . apache . cxf . service . Service service = createService ( ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties inProperties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; inProperties . setCallbackHandler ( new org . apache . cxf . ws . security . wss4j . TestPwdCallback ( ) ) ; java . util . Properties cryptoProperties = org . apache . wss4j . common . crypto . CryptoFactory . getProperties ( "insecurity.properties" , this . getClass ( ) . getClassLoader ( ) ) ; inProperties . setSignatureVerificationCryptoProperties ( cryptoProperties ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor inhandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor ( inProperties ) ; org . apache . cxf . ws . security . wss4j . WSS4JPrincipalInterceptor principalInterceptor = new org . apache . cxf . ws . security . wss4j . WSS4JPrincipalInterceptor ( ) ; principalInterceptor . setPrincipalName ( "CN=myAlias" ) ; service . getInInterceptors ( ) . add ( inhandler ) ; service . getInInterceptors ( ) . add ( principalInterceptor ) ; org . apache . cxf . ws . security . wss4j . StaxCryptoCoverageChecker checker = new org . apache . cxf . ws . security . wss4j . StaxCryptoCoverageChecker ( ) ; service . getInInterceptors ( ) . add ( checker ) ; org . apache . cxf . ws . security . wss4j . Echo echo = createClientProxy ( ) ; org . apache . cxf . endpoint . Client client = org . apache . cxf . frontend . ClientProxy . getClient ( echo ) ; client . getInInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingInInterceptor ( ) ) ; client . getOutInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingOutInterceptor ( ) ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties properties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; java . util . List < org . apache . wss4j . stax . ext . WSSConstants . Action > actions = new java . util . ArrayList ( ) ; actions . add ( XMLSecurityConstants . SIGNATURE ) ; properties . setActions ( actions ) ; properties . setSignatureUser ( "myalias" ) ; java . util . Properties outCryptoProperties = org . apache . wss4j . common . crypto . CryptoFactory . getProperties ( "outsecurity.properties" , this . getClass ( ) . getClassLoader ( ) ) ; properties . setSignatureCryptoProperties ( outCryptoProperties ) ; properties . setCallbackHandler ( new org . apache . cxf . ws . security . wss4j . TestPwdCallback ( ) ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ohandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ( properties ) ; client . getOutInterceptors ( ) . add ( ohandler ) ; "<AssertPlaceHolder>" ; checker . setEncryptBody ( true ) ; try { echo . echo ( "test" ) ; org . junit . Assert . fail ( "Failure<sp>expected<sp>as<sp>SOAP<sp>Body<sp>isn't<sp>encrypted" ) ; } catch ( org . apache . cxf . ws . security . wss4j . javax ex ) { } } echo ( int ) { return i ; }
|
org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) )
|
testConcurrency_MultiInstance ( ) { int iterations = 100 ; final java . util . concurrent . atomic . AtomicInteger lockedCounter = new java . util . concurrent . atomic . AtomicInteger ( ) ; final java . util . Random r = new java . security . SecureRandom ( ) ; testMultiInstanceConcurrency ( iterations , ( rc ) -> { org . redisson . api . RReadWriteLock rwlock = rc . getReadWriteLock ( "testConcurrency_MultiInstance2" ) ; org . redisson . api . RLock lock ; if ( r . nextBoolean ( ) ) { lock = rwlock . writeLock ( ) ; } else { lock = rwlock . readLock ( ) ; } lock . lock ( ) ; lockedCounter . incrementAndGet ( ) ; lock . unlock ( ) ; } ) ; "<AssertPlaceHolder>" ; } get ( ) { return null ; }
|
org . junit . Assert . assertEquals ( iterations , lockedCounter . get ( ) )
|
testFormatLogEventStringBuilderDefaultPattern ( ) { final org . apache . logging . log4j . core . LogEvent event = new org . apache . logging . log4j . core . pattern . DatePatternConverterTest . MyLogEvent ( ) ; final org . apache . logging . log4j . core . pattern . DatePatternConverter converter = org . apache . logging . log4j . core . pattern . DatePatternConverter . newInstance ( null ) ; final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; converter . format ( event , sb ) ; final java . lang . String expected = "2011-12-30<sp>10:56:35,987" ; "<AssertPlaceHolder>" ; } toString ( ) { return this . internal ; }
|
org . junit . Assert . assertEquals ( expected , sb . toString ( ) )
|
pruneTest2 ( ) { org . hillview . dataset . LocalDataSet < java . lang . Integer > lds0 = new org . hillview . dataset . LocalDataSet < java . lang . Integer > ( 0 ) ; org . hillview . dataset . LocalDataSet < java . lang . Integer > lds1 = new org . hillview . dataset . LocalDataSet < java . lang . Integer > ( 1 ) ; java . util . List < org . hillview . test . dataset . IDataSet < java . lang . Integer > > list = java . util . Arrays . asList ( lds0 , lds1 ) ; org . hillview . dataset . ParallelDataSet < java . lang . Integer > pds = new org . hillview . dataset . ParallelDataSet < java . lang . Integer > ( list ) ; org . hillview . test . dataset . IMap < java . lang . Integer , java . lang . Boolean > isZero = ( data ) -> { assert data != null ; return data == 0 ; } ; org . hillview . test . dataset . IDataSet < java . lang . Integer > result = pds . blockingPrune ( isZero ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( result )
|
shouldReadToString ( ) { final java . io . InputStream is = new java . io . ByteArrayInputStream ( "foo" . getBytes ( "UTF-8" ) ) ; "<AssertPlaceHolder>" ; } toString ( java . io . InputStream , java . lang . String ) { return new java . lang . String ( org . pitest . highwheel . util . StreamUtil . streamToByteArray ( in ) , encoding ) ; }
|
org . junit . Assert . assertEquals ( "foo" , org . pitest . highwheel . util . StreamUtil . toString ( is , "UTF-8" ) )
|
testAES256CTRCipher ( ) { final net . schmizz . sshj . DefaultConfig configuration = new net . schmizz . sshj . DefaultConfig ( ) ; configuration . setCipherFactories ( java . util . Collections . singletonList ( new net . schmizz . sshj . transport . cipher . AES256CTR . Factory ( ) ) ) ; final net . schmizz . sshj . SSHClient client = session . connect ( new ch . cyberduck . core . DisabledHostKeyCallback ( ) , configuration ) ; "<AssertPlaceHolder>" ; client . close ( ) ; } isConnected ( ) { if ( super . isConnected ( ) ) { return client . isConnected ( ) ; } return false ; }
|
org . junit . Assert . assertTrue ( client . isConnected ( ) )
|
testInit_whatEver ( ) { java . net . URL url = net . sourceforge . jwbf . JWBF . newURLWithoutHandler ( "whatEver:///a" ) ; java . lang . String packageName = "" ; java . util . Map < java . lang . String , java . lang . String > result = net . sourceforge . jwbf . JWBF . init ( packageName , net . sourceforge . jwbf . JWBF . toUri ( url ) ) ; java . util . Map < java . lang . String , java . lang . String > expected = com . google . common . collect . ImmutableMap . of ( ) ; "<AssertPlaceHolder>" ; } of ( ) { return new net . sourceforge . jwbf . mediawiki . ApiMatcherBuilder ( ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
testSizeAfterDelete ( ) { com . github . davidmoten . rtree3d . Entry < java . lang . Object , com . github . davidmoten . rtree3d . geometry . Box > entry = com . github . davidmoten . rtree3d . RTreeTest . e ( 1 ) ; com . github . davidmoten . rtree3d . RTree < java . lang . Object , com . github . davidmoten . rtree3d . geometry . Box > tree = com . github . davidmoten . rtree3d . RTreeTest . create ( 3 , 0 ) . add ( entry ) . add ( entry ) . add ( entry ) . delete ( entry ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
|
org . junit . Assert . assertEquals ( 2 , tree . size ( ) )
|
runTest ( ) { boolean result = checkNoError ( "Social_Blogs_Blog_Posts" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; }
|
org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result )
|
testTrue ( ) { final java . util . Set < nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Relatie > relatieSet = java . util . Collections . singleton ( relatie ) ; org . mockito . Mockito . when ( persoon . getRelaties ( ) ) . thenReturn ( relatieSet ) ; org . mockito . Mockito . when ( relatie . getDatumAanvang ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . HuwelijkControleTest . DATUM_AANVANG ) ; org . mockito . Mockito . when ( relatie . getGemeenteAanvang ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . HuwelijkControleTest . GEMEENTE_AANVANG ) ; org . mockito . Mockito . when ( relatie . getLandOfGebiedAanvang ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . HuwelijkControleTest . LAND_AANVANG ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht verzoek = new nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ( ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieSoortGroepType relatieSoortGroep = new nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieSoortGroepType ( ) ; relatieSoortGroep . setSoort ( SoortRelatieType . H ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType . Sluiting sluiting = new nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType . Sluiting ( ) ; sluiting . setSoort ( relatieSoortGroep ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieSluitingGroepType relatieSluiting = new nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieSluitingGroepType ( ) ; relatieSluiting . setDatum ( java . math . BigInteger . valueOf ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . HuwelijkControleTest . DATUM_AANVANG ) ) ; relatieSluiting . setLand ( java . lang . String . valueOf ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . HuwelijkControleTest . LAND_AANVANG . getCode ( ) ) ) ; relatieSluiting . setPlaats ( java . lang . String . valueOf ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . HuwelijkControleTest . GEMEENTE_AANVANG . getCode ( ) ) ) ; sluiting . setSluiting ( relatieSluiting ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType relatieType = new nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType ( ) ; relatieType . setSluiting ( sluiting ) ; verzoek . setRelatie ( relatieType ) ; "<AssertPlaceHolder>" ; } controleer ( nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Persoon , nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ) { final nl . bzk . migratiebrp . bericht . model . sync . generated . PersoonType persoon = verzoek . getPersoon ( ) ; if ( persoon == null ) { return false ; } return rootPersoon . getPersoonOverlijdenHistorieSet ( ) . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( subject . controleer ( persoon , verzoek ) )
|
testCanReadViaGroup ( ) { java . lang . String testFileName = "testCanReadViaGroup.xls" ; java . lang . String testUserGroup = "testCanReadViaGroup" ; java . lang . String absPath = org . irods . jargon . core . pub . io . IRODSFileImplTest . scratchFileUtils . createAndReturnAbsoluteScratchPath ( org . irods . jargon . core . pub . io . IRODSFileImplTest . IRODS_TEST_SUBDIR_PATH ) ; java . lang . String fileNameOrig = org . irods . jargon . testutils . filemanip . FileGenerator . generateFileOfFixedLengthGivenName ( absPath , testFileName , 2 ) ; java . lang . String targetIrodsCollection = org . irods . jargon . core . pub . io . IRODSFileImplTest . testingPropertiesHelper . buildIRODSCollectionAbsolutePathFromTestProperties ( org . irods . jargon . core . pub . io . IRODSFileImplTest . testingProperties , org . irods . jargon . core . pub . io . IRODSFileImplTest . IRODS_TEST_SUBDIR_PATH ) ; org . irods . jargon . core . connection . IRODSAccount irodsAccount = org . irods . jargon . core . pub . io . IRODSFileImplTest . testingPropertiesHelper . buildIRODSAccountFromTestProperties ( org . irods . jargon . core . pub . io . IRODSFileImplTest . testingProperties ) ; org . irods . jargon . core . connection . IRODSAccount secondaryIrodsAccount = org . irods . jargon . core . pub . io . IRODSFileImplTest . testingPropertiesHelper . buildIRODSAccountFromSecondaryTestProperties ( org . irods . jargon . core . pub . io . IRODSFileImplTest . testingProperties ) ; org . irods . jargon . core . pub . UserGroupAO userGroupAO = org . irods . jargon . core . pub . io . IRODSFileImplTest . irodsFileSystem . getIRODSAccessObjectFactory ( ) . getUserGroupAO ( irodsAccount ) ; org . irods . jargon . core . pub . domain . UserGroup userGroup = new org . irods . jargon . core . pub . domain . UserGroup ( ) ; userGroup . setUserGroupName ( testUserGroup ) ; userGroup . setZone ( irodsAccount . getZone ( ) ) ; userGroupAO . removeUserGroup ( userGroup ) ; userGroupAO . addUserGroup ( userGroup ) ; userGroupAO . addUserToGroup ( testUserGroup , secondaryIrodsAccount . getUserName ( ) , null ) ; org . irods . jargon . core . pub . DataObjectAO dataObjectAO = org . irods . jargon . core . pub . io . IRODSFileImplTest . irodsFileSystem . getIRODSAccessObjectFactory ( ) . getDataObjectAO ( irodsAccount ) ; org . irods . jargon . core . pub . io . IRODSFile irodsFile = org . irods . jargon . core . pub . io . IRODSFileImplTest . irodsFileSystem . getIRODSFileFactory ( irodsAccount ) . instanceIRODSFile ( targetIrodsCollection ) ; org . irods . jargon . core . pub . DataTransferOperations dto = org . irods . jargon . core . pub . io . IRODSFileImplTest . irodsFileSystem . getIRODSAccessObjectFactory ( ) . getDataTransferOperations ( irodsAccount ) ; dto . putOperation ( new java . io . File ( fileNameOrig ) , irodsFile , null , null ) ; dataObjectAO . setAccessPermissionRead ( "" , ( ( targetIrodsCollection + "/" ) + testFileName ) , testUserGroup ) ; org . irods . jargon . core . pub . EnvironmentalInfoAO environmentalInfoAO = org . irods . jargon . core . pub . io . IRODSFileImplTest . irodsFileSystem . getIRODSAccessObjectFactory ( ) . getEnvironmentalInfoAO ( irodsAccount ) ; org . irods . jargon . core . connection . IRODSServerProperties props = environmentalInfoAO . getIRODSServerPropertiesFromIRODSServer ( ) ; if ( props . isAtLeastIrods410 ( ) ) { return ; } org . irods . jargon . core . pub . io . IRODSFileFactory irodsFileFactory = org . irods . jargon . core . pub . io . IRODSFileImplTest . irodsFileSystem . getIRODSFileFactory ( secondaryIrodsAccount ) ; org . irods . jargon . core . pub . io . IRODSFile actual = irodsFileFactory . instanceIRODSFile ( ( ( targetIrodsCollection + '/' ) + testFileName ) ) ; "<AssertPlaceHolder>" ; } canRead ( ) { boolean canRead = false ; try { canRead = irodsFileSystemAO . isFileReadable ( this ) ; } catch ( org . irods . jargon . core . exception . FileNotFoundException e ) { org . irods . jargon . core . pub . io . IRODSFileImpl . log . warn ( "file<sp>not<sp>found<sp>exception,<sp>return<sp>false" , e ) ; } catch ( org . irods . jargon . core . exception . JargonException e ) { org . irods . jargon . core . pub . io . IRODSFileImpl . log . error ( "jargon<sp>exception,<sp>rethrow<sp>as<sp>unchecked" , e ) ; throw new org . irods . jargon . core . exception . JargonRuntimeException ( e ) ; } return canRead ; }
|
org . junit . Assert . assertTrue ( actual . canRead ( ) )
|
testNoPersonsDeserialize ( ) { java . lang . String xml = loadResource ( "transformer/fitbit_no_person.xml" ) ; java . util . Collection < eu . dime . ps . semantic . model . nco . PersonContact > contacts = transformer . deserialize ( xml , "fitbit" , "/person/@me/@all" , eu . dime . ps . semantic . model . nco . PersonContact . class ) ; "<AssertPlaceHolder>" ; } size ( ) { return fifoList . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , contacts . size ( ) )
|
getLeftTransversalTest ( ) { org . openscience . cdk . group . PermutationGroup group = getCubeGroup ( ) ; java . util . List < org . openscience . cdk . group . Permutation > transversal = group . getLeftTransversal ( 1 ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cells . size ( ) ; }
|
org . junit . Assert . assertEquals ( 3 , transversal . size ( ) )
|
test_aggregatorsAndGroupBy ( ) { try ( org . kairosdb . client . HttpClient client = new org . kairosdb . client . HttpClient ( "http://localhost:8082" ) ) { org . kairosdb . client . MetricBuilder metricBuilder = org . kairosdb . client . MetricBuilder . getInstance ( ) ; org . kairosdb . client . Metric metric1 = metricBuilder . addMetric ( org . kairosdb . client . ClientIntegrationTest . HTTP_METRIC_NAME_1 ) ; metric1 . addTag ( org . kairosdb . client . ClientIntegrationTest . HTTP_TAG_NAME_1 , org . kairosdb . client . ClientIntegrationTest . HTTP_TAG_VALUE_1 ) ; metric1 . addDataPoint ( java . lang . System . currentTimeMillis ( ) , 20 ) ; metric1 . addDataPoint ( java . lang . System . currentTimeMillis ( ) , 21 ) ; metric1 . addDataPoint ( java . lang . System . currentTimeMillis ( ) , 22 ) ; metric1 . addDataPoint ( java . lang . System . currentTimeMillis ( ) , 23 ) ; client . pushMetrics ( metricBuilder ) ; org . kairosdb . client . QueryBuilder builder = org . kairosdb . client . QueryBuilder . getInstance ( ) ; builder . setStart ( 1 , TimeUnit . MINUTES ) ; org . kairosdb . client . QueryMetric metric = builder . addMetric ( org . kairosdb . client . ClientIntegrationTest . HTTP_METRIC_NAME_1 ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createStandardDeviationAggregator ( 1 , TimeUnit . SECONDS ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createRateAggregator ( TimeUnit . SECONDS ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createSumAggregator ( 1 , TimeUnit . SECONDS ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createDivAggregator ( 5 ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createCountAggregator ( 1 , TimeUnit . SECONDS ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createAverageAggregator ( 1 , TimeUnit . SECONDS ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createMaxAggregator ( 1 , TimeUnit . SECONDS ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createMinAggregator ( 1 , TimeUnit . SECONDS ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createMaxAggregator ( 1 , TimeUnit . SECONDS ) . withSamplingAlignment ( ) . withStartTimeAlignment ( ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createMinAggregator ( 1 , TimeUnit . SECONDS ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createPercentileAggregator ( 0.3 , 1 , TimeUnit . SECONDS ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createLastAggregator ( 1 , TimeUnit . SECONDS ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createFirstAggregator ( 1 , TimeUnit . SECONDS ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createDiffAggregator ( ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createLeastSquaresAggregator ( 1 , TimeUnit . SECONDS ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createSamplerAggregator ( ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createScaleAggregator ( 0.05 ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createSaveAsAggregator ( "newMetricName" ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createTrimAggregator ( AggregatorFactory . Trim . BOTH ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createSimpleMovingAverage ( 2 ) ) ; metric . addAggregator ( org . kairosdb . client . AggregatorFactory . createDataGapsMarkingAggregator ( 1 , TimeUnit . SECONDS ) ) ; metric . addGrouper ( new org . kairosdb . client . builder . grouper . TagGrouper ( org . kairosdb . client . ClientIntegrationTest . HTTP_TAG_NAME_1 , org . kairosdb . client . ClientIntegrationTest . HTTP_TAG_NAME_2 ) ) ; metric . addGrouper ( new org . kairosdb . client . builder . grouper . TimeGrouper ( new org . kairosdb . client . RelativeTime ( 1 , TimeUnit . MILLISECONDS ) , 3 ) ) ; metric . addGrouper ( new org . kairosdb . client . builder . grouper . ValueGrouper ( 4 ) ) ; metric . addGrouper ( new org . kairosdb . client . builder . grouper . BinGrouper ( 2.0 , 3.0 , 4.0 ) ) ; org . kairosdb . client . response . QueryResponse response = client . query ( builder ) ; "<AssertPlaceHolder>" ; } } getQueries ( ) { return ( queries ) == null ? com . google . common . collect . ImmutableList . of ( ) : queries ; }
|
org . junit . Assert . assertThat ( response . getQueries ( ) . size ( ) , equalTo ( 1 ) )
|
onGetDefaultValueShouldReturnDefaultValueFromXmlWhenSet ( ) { final int [ ] data = new int [ 20 ] ; data [ 6 ] = android . util . TypedValue . TYPE_FIRST_INT ; data [ 7 ] = 50 ; final android . content . res . TypedArray typedArray = org . robolectric . shadows . ShadowTypedArray . create ( null , null , data , null , 0 , null ) ; final java . lang . Integer value = ( ( java . lang . Integer ) ( preference . onGetDefaultValue ( typedArray , 1 ) ) ) ; "<AssertPlaceHolder>" ; } onGetDefaultValue ( android . content . res . TypedArray , int ) { return typedArray . getInteger ( index , defaultColor ) ; }
|
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 50 ) , value )
|
distinctOrTest ( ) { testUp ( ) ; com . rhwayfun . springboot . mybatis . entity . UserExample example = new com . rhwayfun . springboot . mybatis . entity . UserExample ( ) ; example . setDistinct ( true ) ; com . rhwayfun . springboot . mybatis . entity . UserExample . Criteria criteria = example . createCriteria ( ) ; criteria . andAgeIsNotNull ( ) ; com . rhwayfun . springboot . mybatis . entity . UserExample . Criteria or = example . or ( ) ; or . andIdIsNotNull ( ) ; example . setOrderByClause ( "id<sp>asc" ) ; java . util . List < com . rhwayfun . springboot . mybatis . entity . User > users = userMapper . selectByExample ( example ) ; "<AssertPlaceHolder>" ; tearDown ( ) ; } setOrderByClause ( java . lang . String ) { this . orderByClause = orderByClause ; }
|
org . junit . Assert . assertTrue ( ( ( users . size ( ) ) > 0 ) )
|
testEnglishUserEnglishSessionPathWithEnglishCookieAlgorithm3 ( ) { java . lang . String prependI18nLanguageId = getPrependI18nLanguageId ( 3 , LocaleUtil . US , LocaleUtil . US , LocaleUtil . US ) ; "<AssertPlaceHolder>" ; } getPrependI18nLanguageId ( int , java . util . Locale , java . util . Locale , java . util . Locale ) { javax . servlet . http . HttpSession session = _mockHttpServletRequest . getSession ( ) ; session . setAttribute ( WebKeys . LOCALE , sessionLocale ) ; if ( userLocale != null ) { com . liferay . portal . kernel . model . User user = com . liferay . portal . kernel . test . util . UserTestUtil . addUser ( null , userLocale , com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) , com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) , new long [ ] { _group . getGroupId ( ) } ) ; _mockHttpServletRequest . setAttribute ( WebKeys . USER , user ) ; } if ( cookieLocale != null ) { com . liferay . portal . kernel . language . LanguageUtil . updateCookie ( _mockHttpServletRequest , _mockHttpServletResponse , cookieLocale ) ; _mockHttpServletRequest . setCookies ( _mockHttpServletResponse . getCookies ( ) ) ; } return _i18nFilter . prependI18nLanguageId ( _mockHttpServletRequest , localePrependFriendlyURLStyle ) ; }
|
org . junit . Assert . assertNull ( prependI18nLanguageId )
|
testEmpty ( ) { uk . gov . gchq . gaffer . commonutil . elementvisibilityutil . ElementVisibility a = new uk . gov . gchq . gaffer . commonutil . elementvisibilityutil . ElementVisibility ( new byte [ 0 ] ) ; uk . gov . gchq . gaffer . commonutil . elementvisibilityutil . ElementVisibility b = new uk . gov . gchq . gaffer . commonutil . elementvisibilityutil . ElementVisibility ( "" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( a , b )
|
testConvertAll ( ) { java . lang . Long id = 1L ; java . lang . Long publicActivityId = 2L ; org . lnu . is . domain . publicactivity . PublicActivity publicActivity = new org . lnu . is . domain . publicactivity . PublicActivity ( ) ; publicActivity . setId ( publicActivityId ) ; java . lang . Long enrolmentSubjectId = 3L ; org . lnu . is . domain . enrolment . subject . EnrolmentSubject enrolmentSubject = new org . lnu . is . domain . enrolment . subject . EnrolmentSubject ( ) ; enrolmentSubject . setId ( enrolmentSubjectId ) ; java . lang . String awardname = "award<sp>name" ; java . lang . Double bonus = 2.1 ; java . util . Date begDate = new java . util . Date ( ) ; java . util . Date endDate = new java . util . Date ( ) ; org . lnu . is . domain . publicactivity . PublicActivityAward source = new org . lnu . is . domain . publicactivity . PublicActivityAward ( ) ; source . setId ( id ) ; source . setPublicActivity ( publicActivity ) ; source . setEnrolmentSubject ( enrolmentSubject ) ; source . setAwardName ( awardname ) ; source . setBonus ( bonus ) ; source . setBegDate ( begDate ) ; source . setEndDate ( endDate ) ; java . util . List < org . lnu . is . domain . publicactivity . PublicActivityAward > sources = java . util . Arrays . asList ( source ) ; org . lnu . is . resource . publicactivity . award . PublicActivityAwardResource expected = new org . lnu . is . resource . publicactivity . award . PublicActivityAwardResource ( ) ; expected . setId ( id ) ; expected . setPublicActivityId ( publicActivityId ) ; expected . setEnrolmentSubjectId ( enrolmentSubjectId ) ; expected . setAwardName ( awardname ) ; expected . setBonus ( bonus ) ; expected . setBegDate ( begDate ) ; expected . setEndDate ( endDate ) ; java . util . List < org . lnu . is . resource . publicactivity . award . PublicActivityAwardResource > expecteds = java . util . Arrays . asList ( expected ) ; java . util . List < org . lnu . is . resource . publicactivity . award . PublicActivityAwardResource > actuals = unit . convertAll ( sources ) ; "<AssertPlaceHolder>" ; } convertAll ( java . util . List ) { return convertAll ( sources , new java . util . ArrayList < TARGET > ( sources . size ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( expecteds , actuals )
|
accept ( ) { org . eclipse . collections . impl . block . predicate . MapEntryPredicate < java . lang . String , java . lang . Integer > mapEntryPredicate = new org . eclipse . collections . impl . block . predicate . MapEntryPredicate < java . lang . String , java . lang . Integer > ( ) { @ org . eclipse . collections . impl . block . predicate . Override public boolean accept ( java . lang . String argument1 , java . lang . Integer argument2 ) { return java . lang . String . valueOf ( argument2 ) . equals ( argument1 ) ; } } ; "<AssertPlaceHolder>" ; } accept ( boolean ) { return false ; }
|
org . junit . Assert . assertTrue ( mapEntryPredicate . accept ( this . entry ) )
|
testPlusDateValues ( ) { java . lang . String sqlText = "values<sp>date('2011-12-26')<sp>+<sp>1" ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . SimpleDateArithmeticIT . spliceClassWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "1<sp>|\n" + ( "------------\n" + "2011-12-27<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 ) )
|
saveOrder_shouldPassDrugOrderWithoutADrugWhenDrugOrderRequireDrugGBIsFalse ( ) { org . openmrs . GlobalProperty gp = new org . openmrs . GlobalProperty ( org . openmrs . util . OpenmrsConstants . GLOBAL_PROPERTY_DRUG_ORDER_REQUIRE_DRUG , "false" ) ; org . openmrs . api . context . Context . getAdministrationService ( ) . saveGlobalProperty ( gp ) ; org . openmrs . Patient patient = org . openmrs . api . context . Context . getPatientService ( ) . getPatient ( 7 ) ; org . openmrs . CareSetting careSetting = org . openmrs . api . context . Context . getOrderService ( ) . getCareSetting ( 2 ) ; org . openmrs . OrderType orderType = org . openmrs . api . context . Context . getOrderService ( ) . getOrderTypeByName ( "Drug<sp>order" ) ; org . openmrs . DrugOrder order = new org . openmrs . DrugOrder ( ) ; org . openmrs . Encounter encounter = org . openmrs . api . context . Context . getEncounterService ( ) . getEncounter ( 3 ) ; order . setEncounter ( encounter ) ; order . setConcept ( org . openmrs . api . context . Context . getConceptService ( ) . getConcept ( 5497 ) ) ; order . setPatient ( patient ) ; order . setCareSetting ( careSetting ) ; order . setOrderer ( org . openmrs . api . context . Context . getProviderService ( ) . getProvider ( 1 ) ) ; order . setDateActivated ( encounter . getEncounterDatetime ( ) ) ; order . setOrderType ( orderType ) ; order . setDosingType ( org . openmrs . FreeTextDosingInstructions . class ) ; order . setInstructions ( "None" ) ; order . setDosingInstructions ( "Test<sp>Instruction" ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( order , "order" ) ; new org . openmrs . validator . DrugOrderValidator ( ) . validate ( order , errors ) ; "<AssertPlaceHolder>" ; } hasFieldErrors ( ) { return new org . openmrs . test . matchers . HasFieldErrors ( null , null ) ; }
|
org . junit . Assert . assertFalse ( errors . hasFieldErrors ( ) )
|
shouldReturnTrueWhenSchemaHasValidatorEdgeIdentifierFilters ( ) { final uk . gov . gchq . gaffer . store . schema . Schema schema = new uk . gov . gchq . gaffer . store . schema . Schema . Builder ( ) . edge ( TestGroups . EDGE , new uk . gov . gchq . gaffer . store . schema . SchemaEdgeDefinition . Builder ( ) . source ( "str" ) . destination ( "dest" ) . build ( ) ) . type ( "str" , new uk . gov . gchq . gaffer . store . schema . TypeDefinition . Builder ( ) . validateFunctions ( new uk . gov . gchq . koryphe . impl . predicate . Exists ( ) ) . build ( ) ) . edge ( TestGroups . EDGE_2 , new uk . gov . gchq . gaffer . store . schema . SchemaEdgeDefinition . Builder ( ) . source ( "src" ) . destination ( "dest" ) . build ( ) ) . build ( ) ; final boolean result = schema . hasValidation ( ) ; "<AssertPlaceHolder>" ; } hasValidation ( ) { for ( final uk . gov . gchq . gaffer . store . schema . SchemaElementDefinition elementDef : new uk . gov . gchq . gaffer . commonutil . iterable . ChainedIterable < uk . gov . gchq . gaffer . store . schema . SchemaElementDefinition > ( getEntities ( ) . values ( ) , getEdges ( ) . values ( ) ) ) { if ( null != elementDef ) { if ( elementDef . hasValidation ( ) ) { return true ; } } } return false ; }
|
org . junit . Assert . assertTrue ( result )
|
shouldSelectOneAuthorWithInlineParams ( ) { org . apache . ibatis . session . SqlSession session = org . apache . ibatis . session . SqlSessionTest . sqlMapper . openSession ( ) ; try { org . apache . ibatis . domain . blog . Author author = session . selectOne ( "org.apache.ibatis.domain.blog.mappers.AuthorMapper.selectAuthorWithInlineParams" , new org . apache . ibatis . domain . blog . Author ( 101 ) ) ; "<AssertPlaceHolder>" ; } finally { session . close ( ) ; } } getId ( ) { return delegate . getId ( ) ; }
|
org . junit . Assert . assertEquals ( 101 , author . getId ( ) )
|
testGetConnection ( ) { org . eclipse . birt . report . data . oda . jdbc . OdaJdbcDriver connFact = new org . eclipse . birt . report . data . oda . jdbc . OdaJdbcDriver ( ) ; org . eclipse . birt . report . data . oda . jdbc . Connection conn = ( ( org . eclipse . birt . report . data . oda . jdbc . Connection ) ( connFact . getConnection ( "" ) ) ) ; "<AssertPlaceHolder>" ; } getConnection ( java . lang . String ) { return new org . eclipse . birt . report . data . oda . hive . HiveDriver . HiveConnection ( ) ; }
|
org . junit . Assert . assertNotNull ( conn )
|
setNull ( ) { com . google . gson . JsonObject built = new io . gsonfire . builders . JsonObjectBuilder ( ) . setNull ( "a" ) . build ( ) ; com . google . gson . JsonObject expected = new com . google . gson . JsonObject ( ) ; expected . add ( "a" , null ) ; "<AssertPlaceHolder>" ; } build ( ) { return io . gsonfire . util . JsonUtils . deepCopy ( array ) . getAsJsonArray ( ) ; }
|
org . junit . Assert . assertEquals ( expected , built )
|
testMuxBalancersClosed ( ) { configure ( ) ; routeToFirstServer ( ) ; com . devexperts . rmi . RMIRequest < java . lang . Double > sum = createSumRequest ( ) ; sum . send ( ) ; sum . getBlocking ( ) ; "<AssertPlaceHolder>" ; muxes . close ( ) ; await ( TestRMILoadBalancerFactory :: areClientBalancersClosed ) ; } areClientBalancersClosed ( ) { return com . devexperts . rmi . test . routing . TestRMILoadBalancerFactory . areBalancersClosed ( true ) ; }
|
org . junit . Assert . assertFalse ( com . devexperts . rmi . test . routing . TestRMILoadBalancerFactory . areClientBalancersClosed ( ) )
|
testUrlWithWhiteSpaces ( ) { java . io . File f = new java . io . File ( "test/rules/test<sp>xls/Test<sp>with<sp>spaces.xls" ) ; org . openl . rules . lang . xls . XlsWorkbookSourceCodeModule module = new org . openl . rules . lang . xls . XlsWorkbookSourceCodeModule ( new org . openl . source . impl . URLSourceCodeModule ( f . toURI ( ) . toURL ( ) ) ) ; "<AssertPlaceHolder>" ; } getSourceFile ( ) { synchronized ( fileAccessLock ) { org . openl . rules . lang . xls . File sourceFile = null ; try { if ( ( src ) instanceof org . openl . source . impl . URLSourceCodeModule ) { java . net . URL url = ( ( org . openl . source . impl . URLSourceCodeModule ) ( src ) ) . getUrl ( ) ; sourceFile = new org . openl . rules . lang . xls . File ( url . toURI ( ) ) ; } else { java . net . URI uri = new java . net . URI ( getUri ( ) ) ; sourceFile = new org . openl . rules . lang . xls . File ( uri ) ; } } catch ( java . net . URISyntaxException me ) { log . error ( "Can<sp>not<sp>get<sp>source<sp>file" , me ) ; } return sourceFile ; } }
|
org . junit . Assert . assertNotNull ( module . getSourceFile ( ) )
|
testUsingDefaultConfig ( ) { appender . start ( ) ; "<AssertPlaceHolder>" ; appender . stop ( ) ; } getServerSocketFactory ( ) { return socketFactory ; }
|
org . junit . Assert . assertNotNull ( appender . getServerSocketFactory ( ) )
|
testGetMillisecondsTime ( ) { com . bixly . pastevid . recorders . RecorderTest . log ( "getMillisecondsTime" ) ; com . bixly . pastevid . recorders . Recorder instance = new com . bixly . pastevid . recorders . Recorder ( null ) ; long expResult = 0L ; long result = instance . getMillisecondsTime ( ) ; "<AssertPlaceHolder>" ; } getMillisecondsTime ( ) { return ( this . measurable ) != null ? this . measurable . getValue ( ) : 0L ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testValidateSubscriptionWithoutException ( ) { org . oscm . internal . vo . VOTechnicalService tp = createTechnicalProduct ( svcProv ) ; container . login ( supplierUserKey , org . oscm . serviceprovisioningservice . bean . ROLE_SERVICE_MANAGER ) ; final org . oscm . internal . vo . VOServiceDetails product = createProduct ( tp , "testProd" , svcProv ) ; final org . oscm . internal . vo . VOPriceModel priceModel_init = createPriceModel ( ) ; svcProv . savePriceModel ( product , priceModel_init ) ; org . oscm . internal . vo . VOOrganization customer = getOrganizationForOrgId ( supplierOrgId ) ; java . lang . String subId = createSubscription ( customer , SubscriptionStatus . ACTIVE , product , "testSubscriptionToValidate" , null ) ; org . oscm . internal . vo . VOServiceDetails forSubscription = svcProv . getServiceForSubscription ( customer , subId ) ; svcProv . validateSubscription ( forSubscription ) ; "<AssertPlaceHolder>" ; } validateSubscription ( org . oscm . internal . vo . VOSubscriptionDetails ) { if ( ( subscription == null ) || ( ( subscription . getPriceModel ( ) ) == null ) ) { addMessage ( null , FacesMessage . SEVERITY_ERROR , org . oscm . ui . beans . ERROR_EXTERNAL_PRICEMODEL_NOT_AVAILABLE ) ; return null ; } if ( ! ( subscription . getPriceModel ( ) . isExternal ( ) ) ) { return null ; } try { return validateSubscription ( subscription . getSubscribedService ( ) ) ; } catch ( org . oscm . internal . types . exception . SaaSApplicationException e ) { if ( e instanceof org . oscm . internal . types . exception . SubscriptionStateException ) { addMessage ( null , FacesMessage . SEVERITY_ERROR , org . oscm . ui . beans . ERROR_SUBSCRIPTION_NOT_ACCESSIBLE , new java . lang . String [ ] { subscription . getSubscriptionId ( ) } ) ; setDirty ( false ) ; return null ; } throw e ; } }
|
org . junit . Assert . assertNotNull ( subId )
|
testGetIPAddressMask ( ) { org . mockito . Mockito . doReturn ( com . digi . xbee . api . WiFiDeviceTest . IP_ADDRESS ) . when ( wifiDevice ) . getParameter ( com . digi . xbee . api . WiFiDeviceTest . PARAMETER_MK ) ; "<AssertPlaceHolder>" ; } getIPAddressMask ( ) { try { return ( ( java . net . Inet4Address ) ( java . net . Inet4Address . getByAddress ( getParameter ( "MK" ) ) ) ) ; } catch ( java . net . UnknownHostException e ) { throw new com . digi . xbee . api . exceptions . XBeeException ( e ) ; } }
|
org . junit . Assert . assertEquals ( java . net . Inet4Address . getByAddress ( com . digi . xbee . api . WiFiDeviceTest . IP_ADDRESS ) , wifiDevice . getIPAddressMask ( ) )
|
should_delete_database_entry ( ) { final org . mamute . model . Attachment attachment = createAttachment ( "test" ) ; attachmentRepository . save ( attachment ) ; attachmentRepository . delete ( attachment ) ; "<AssertPlaceHolder>" ; } load ( java . lang . Long ) { org . mamute . model . Attachment load = attachments . load ( attachmentId ) ; if ( load == null ) { throw new org . mamute . infra . NotFoundException ( ) ; } return load ; }
|
org . junit . Assert . assertNull ( attachments . load ( attachment . getId ( ) ) )
|
testConnectionCloseInPool ( ) { io . reactiverse . pgclient . pool . ConnectionQueue queue = new io . reactiverse . pgclient . pool . ConnectionQueue ( ) ; io . reactiverse . pgclient . impl . ConnectionPool pool = new io . reactiverse . pgclient . impl . ConnectionPool ( queue , 1 ) ; io . reactiverse . pgclient . pool . SimpleHolder holder = new io . reactiverse . pgclient . pool . SimpleHolder ( ) ; pool . acquire ( holder ) ; io . reactiverse . pgclient . pool . SimpleConnection conn = new io . reactiverse . pgclient . pool . SimpleConnection ( ) ; queue . connect ( conn ) ; holder . init ( ) ; holder . close ( ) ; conn . close ( ) ; "<AssertPlaceHolder>" ; } available ( ) { return available . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , pool . available ( ) )
|
testSendsOutOfRangeItems ( ) { com . eclipsesource . tabris . widgets . swipe . SwipeItemProvider itemProvider = com . eclipsesource . tabris . widgets . swipe . SwipeTest . mockProvider ( 4 ) ; com . eclipsesource . tabris . widgets . swipe . SwipeTest . mockSwipeItem ( itemProvider , 0 , true ) ; com . eclipsesource . tabris . widgets . swipe . SwipeTest . mockSwipeItem ( itemProvider , 1 , true ) ; com . eclipsesource . tabris . widgets . swipe . SwipeTest . mockSwipeItem ( itemProvider , 2 , true ) ; com . eclipsesource . tabris . widgets . swipe . SwipeTest . mockSwipeItem ( itemProvider , 3 , true ) ; com . eclipsesource . tabris . widgets . swipe . Swipe swipe = new com . eclipsesource . tabris . widgets . swipe . Swipe ( shell , itemProvider ) ; swipe . show ( 1 ) ; swipe . show ( 2 ) ; org . mockito . ArgumentCaptor < org . eclipse . rap . json . JsonObject > captor = org . mockito . ArgumentCaptor . forClass ( org . eclipse . rap . json . JsonObject . class ) ; verify ( remoteObject ) . call ( eq ( "remove" ) , captor . capture ( ) ) ; org . eclipse . rap . json . JsonArray items = captor . getValue ( ) . get ( "items" ) . asArray ( ) ; "<AssertPlaceHolder>" ; } add ( com . eclipsesource . tabris . internal . ui . rendering . PageRenderer ) { renderers . add ( renderer ) ; }
|
org . junit . Assert . assertEquals ( new org . eclipse . rap . json . JsonArray ( ) . add ( 0 ) , items )
|
singleUpload_progressReporter ( ) { final com . oracle . bmc . objectstorage . transfer . UploadConfiguration uploadConfiguration = com . oracle . bmc . objectstorage . transfer . UploadConfiguration . builder ( ) . allowMultipartUploads ( false ) . build ( ) ; final com . oracle . bmc . objectstorage . transfer . UploadManager uploadManager = new com . oracle . bmc . objectstorage . transfer . UploadManager ( objectStorage , uploadConfiguration ) ; final java . util . concurrent . atomic . AtomicInteger expectedProgressNotificationCount = new java . util . concurrent . atomic . AtomicInteger ( ) ; when ( objectStorage . putObject ( any ( com . oracle . bmc . objectstorage . requests . PutObjectRequest . class ) ) ) . then ( new org . mockito . stubbing . Answer < com . oracle . bmc . objectstorage . responses . PutObjectResponse > ( ) { @ com . oracle . bmc . objectstorage . transfer . Override public com . oracle . bmc . objectstorage . responses . PutObjectResponse answer ( org . mockito . invocation . InvocationOnMock invocationOnMock ) throws java . lang . Throwable { final com . oracle . bmc . objectstorage . requests . PutObjectRequest putObjectRequest = invocationOnMock . getArgumentAt ( 0 , null ) ; final java . io . InputStream inputStream = putObjectRequest . getPutObjectBody ( ) ; byte [ ] buffer = new byte [ com . oracle . bmc . objectstorage . transfer . UploadManagerTest . READ_BLOCK_SIZE ] ; while ( ( inputStream . read ( buffer ) ) != ( - 1 ) ) { expectedProgressNotificationCount . getAndIncrement ( ) ; } return com . oracle . bmc . objectstorage . responses . PutObjectResponse . builder ( ) . build ( ) ; } } ) ; final com . oracle . bmc . objectstorage . transfer . ProgressReporter progressReporter = mock ( com . oracle . bmc . objectstorage . transfer . ProgressReporter . class ) ; final com . oracle . bmc . objectstorage . transfer . UploadManager . UploadResponse uploadResponse = uploadManager . upload ( createUploadRequest ( progressReporter ) ) ; "<AssertPlaceHolder>" ; verify ( progressReporter , times ( expectedProgressNotificationCount . get ( ) ) ) . onProgress ( and ( gt ( 0L ) , leq ( com . oracle . bmc . objectstorage . transfer . UploadManagerTest . CONTENT_LENGTH ) ) , eq ( com . oracle . bmc . objectstorage . transfer . UploadManagerTest . CONTENT_LENGTH ) ) ; } createUploadRequest ( com . oracle . bmc . objectstorage . transfer . ProgressReporter ) { com . oracle . bmc . objectstorage . requests . PutObjectRequest request = com . oracle . bmc . objectstorage . requests . PutObjectRequest . builder ( ) . opcMeta ( com . oracle . bmc . objectstorage . transfer . UploadManagerTest . METADATA ) . opcClientRequestId ( com . oracle . bmc . objectstorage . transfer . UploadManagerTest . CLIENT_REQ_ID ) . contentLanguage ( com . oracle . bmc . objectstorage . transfer . UploadManagerTest . CONTENT_LANG ) . contentType ( com . oracle . bmc . objectstorage . transfer . UploadManagerTest . CONTENT_TYPE ) . contentEncoding ( com . oracle . bmc . objectstorage . transfer . UploadManagerTest . CONTENT_ENCODING ) . build ( ) ; return com . oracle . bmc . objectstorage . transfer . UploadManager . UploadRequest . builder ( body , com . oracle . bmc . objectstorage . transfer . UploadManagerTest . CONTENT_LENGTH ) . progressReporter ( progressReporter ) . build ( request ) ; }
|
org . junit . Assert . assertNotNull ( uploadResponse )
|
testColumnsOfNumericType ( ) { methodWatcher . executeUpdate ( "alter<sp>table<sp>t4<sp>add<sp>column<sp>b4<sp>smallint<sp>not<sp>null<sp>default<sp>-32768" ) ; methodWatcher . executeUpdate ( "select<sp>a4,<sp>b4+1,<sp>c4+1,<sp>d4+1,<sp>e4+1,<sp>f4+1<sp>from<sp>t4<sp>--splice-properties<sp>index=idx1_t4,<sp>useSpark=%s\n<sp>where<sp>a4=10" 1 ) ; methodWatcher . executeUpdate ( "select<sp>a4,<sp>b4+1,<sp>c4+1,<sp>d4+1,<sp>e4+1,<sp>f4+1<sp>from<sp>t4<sp>--splice-properties<sp>index=idx1_t4,<sp>useSpark=%s\n<sp>where<sp>a4=10" 6 ) ; methodWatcher . executeUpdate ( "select<sp>a4,<sp>b4+1,<sp>c4+1,<sp>d4+1,<sp>e4+1,<sp>f4+1<sp>from<sp>t4<sp>--splice-properties<sp>index=idx1_t4,<sp>useSpark=%s\n<sp>where<sp>a4=10" 2 ) ; methodWatcher . executeUpdate ( "alter<sp>table<sp>t4<sp>add<sp>column<sp>f4<sp>decimal(5,2)<sp>not<sp>null<sp>default<sp>-3.33" ) ; methodWatcher . executeUpdate ( "create<sp>index<sp>idx1_t4<sp>on<sp>t4<sp>(b4,<sp>c4)" ) ; methodWatcher . executeUpdate ( "insert<sp>into<sp>t4<sp>values<sp>(10,<sp>10,<sp>1000000,<sp>10.11,<sp>10.22,<sp>10.33)" ) ; sql = format ( "select<sp>a4,<sp>b4+1,<sp>c4+1,<sp>d4+1,<sp>e4+1,<sp>f4+1<sp>from<sp>t4<sp>--splice-properties<sp>index=idx1_t4,<sp>useSpark=%s\n<sp>where<sp>a4=10" 5 , useSparkString ) ; expected = "select<sp>a4,<sp>b4+1,<sp>c4+1,<sp>d4+1,<sp>e4+1,<sp>f4+1<sp>from<sp>t4<sp>--splice-properties<sp>index=idx1_t4,<sp>useSpark=%s\n<sp>where<sp>a4=10" 3 + ( ( ( ( "-------------------------------------------------------\n" + "select<sp>a4,<sp>b4+1,<sp>c4+1,<sp>d4+1,<sp>e4+1,<sp>f4+1<sp>from<sp>t4<sp>--splice-properties<sp>index=idx1_t4,<sp>useSpark=%s\n<sp>where<sp>a4=10" 4 ) + "10<sp>|<sp>11<sp>|<sp>1000001<sp>|11.11<sp>|11.22<sp>|11.33<sp>|\n" ) + "<sp>2<sp>|-32767<sp>|-9223372036854775807<sp>|<sp>0.0<sp>|-1.0<sp>|-2.33<sp>|\n" ) + "<sp>3<sp>|-32767<sp>|-9223372036854775807<sp>|<sp>0.0<sp>|-1.0<sp>|-2.33<sp>|" ) ; rs = methodWatcher . executeQuery ( sql ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toString ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs ) . toString ( ) . trim ( ) ; }
|
org . junit . Assert . assertEquals ( expected , TestUtils . FormattedResult . ResultFactory . toString ( rs ) )
|
testUpdateReservationNormal ( ) { org . apache . hadoop . yarn . api . protocolrecords . ReservationUpdateRequest request = createSimpleReservationUpdateRequest ( 1 , 1 , 1 , 5 , 3 ) ; org . apache . hadoop . yarn . server . resourcemanager . reservation . Plan plan = null ; try { plan = rrValidator . validateReservationUpdateRequest ( rSystem , request ) ; } catch ( org . apache . hadoop . yarn . exceptions . YarnException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; }
|
org . junit . Assert . assertNotNull ( plan )
|
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS70 icms70 = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS70 ( ) ; icms70 . setSituacaoTributaria ( NFNotaInfoImpostoTributacaoICMS . COM_REDUCAO_BASE_CALCULO ) ; icms70 . setModalidadeBCICMS ( NFNotaInfoItemModalidadeBCICMS . VALOR_OPERACAO ) ; icms70 . setModalidadeBCICMSST ( NFNotaInfoItemModalidadeBCICMSST . LISTA_NEUTRA ) ; icms70 . setOrigem ( NFOrigem . ESTRANGEIRA_ADQUIRIDA_MERCADO_INTERNO ) ; icms70 . setPercentualAliquota ( new java . math . BigDecimal ( "99.99" ) ) ; icms70 . setPercentualAliquotaImpostoICMSST ( new java . math . BigDecimal ( "99.99" ) ) ; icms70 . setPercentualMargemValorAdicionadoICMSST ( new java . math . BigDecimal ( "99.99" ) ) ; icms70 . setPercentualReducaoBC ( new java . math . BigDecimal ( "99.99" ) ) ; icms70 . setPercentualReducaoBCICMSST ( new java . math . BigDecimal ( "99.99" ) ) ; icms70 . setValorBC ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms70 . setValorBCST ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms70 . setValorICMSST ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms70 . setValorTributo ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms70 . setDesoneracao ( NFNotaMotivoDesoneracaoICMS . OUTROS ) ; icms70 . setValorICMSDesoneracao ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms70 . setValorBCFundoCombatePobreza ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms70 . setPercentualFundoCombatePobreza ( new java . math . BigDecimal ( "99.99" ) ) ; icms70 . setValorFundoCombatePobreza ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms70 . setValorBCFundoCombatePobrezaST ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms70 . setPercentualFundoCombatePobrezaST ( new java . math . BigDecimal ( "99.99" ) ) ; icms70 . setValorFundoCombatePobrezaST ( new java . math . BigDecimal ( "999999999999.99" ) ) ; final java . lang . String xmlEsperado = "<NFNotaInfoItemImpostoICMS70><orig>2</orig><CST>20</CST><modBC>3</modBC><pRedBC>99.99</pRedBC><vBC>999999999999.99</vBC><pICMS>99.99</pICMS><vICMS>999999999999.99</vICMS><vBCFCP>999999999999.99</vBCFCP><pFCP>99.99</pFCP><vFCP>999999999999.99</vFCP><modBCST>3</modBCST><pMVAST>99.99</pMVAST><pRedBCST>99.99</pRedBCST><vBCST>999999999999.99</vBCST><pICMSST>99.99</pICMSST><vICMSST>999999999999.99</vICMSST><vBCFCPST>999999999999.99</vBCFCPST><pFCPST>99.99</pFCPST><vFCPST>999999999999.99</vFCPST><vICMSDeson>999999999999.99</vICMSDeson><motDesICMS>9</motDesICMS></NFNotaInfoItemImpostoICMS70>" ; "<AssertPlaceHolder>" ; } toString ( ) { return this . getDescricao ( ) ; }
|
org . junit . Assert . assertEquals ( xmlEsperado , icms70 . toString ( ) )
|
testExpandDataPointWithNullValueMetric ( ) { org . apache . storm . metric . util . DataPointExpander populator = new org . apache . storm . metric . util . DataPointExpander ( true , "." ) ; org . apache . storm . metric . api . IMetricsConsumer . DataPoint point = new org . apache . storm . metric . api . IMetricsConsumer . DataPoint ( "point" , null ) ; java . util . Collection < org . apache . storm . metric . api . IMetricsConsumer . DataPoint > expandedDataPoints = populator . expandDataPoint ( point ) ; "<AssertPlaceHolder>" ; } size ( ) { return keys . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , expandedDataPoints . size ( ) )
|
testRotating ( ) { ru . yandex . qatools . ashot . shooting . RotatingDecorator strategy = new ru . yandex . qatools . ashot . shooting . RotatingDecorator ( new ru . yandex . qatools . ashot . shooting . cutter . FixedCutStrategy ( 0 , 0 ) , new ru . yandex . qatools . ashot . shooting . RotatingDecoratorTest . MockShootingStrategy ( ) ) ; java . awt . image . BufferedImage screenshot = strategy . getScreenshot ( wd ) ; ru . yandex . qatools . ashot . comparison . ImageDiff diff = new ru . yandex . qatools . ashot . comparison . ImageDiffer ( ) . makeDiff ( loadImage ( "img/expected/rotated.png" ) , screenshot ) ; "<AssertPlaceHolder>" ; } hasDiff ( ) { return ( diffPointCount ) > ( diffSizeTrigger ) ; }
|
org . junit . Assert . assertFalse ( diff . hasDiff ( ) )
|
testIsSignedInWithDisconnectedUser ( ) { final java . lang . String COOKIE_NAME = "captain_debug_social_user" ; final java . lang . String COOKIE_VALUE = "qwerty" ; javax . servlet . http . Cookie [ ] cookies = new javax . servlet . http . Cookie [ 1 ] ; javax . servlet . http . Cookie cookie = new javax . servlet . http . Cookie ( COOKIE_NAME , COOKIE_VALUE ) ; cookies [ 0 ] = cookie ; expect ( request . getCookies ( ) ) . andReturn ( cookies ) ; expect ( userConnectionRespository . createConnectionRepository ( COOKIE_VALUE ) ) . andReturn ( connectionRespository ) ; expect ( connectionRespository . findPrimaryConnection ( org . springframework . social . facebook . api . Facebook . class ) ) . andReturn ( null ) ; cookie = new javax . servlet . http . Cookie ( COOKIE_NAME , "" ) ; response . addCookie ( cookie ) ; replay ( ) ; boolean result = instance . isSignedIn ( request , response ) ; verify ( ) ; "<AssertPlaceHolder>" ; } verify ( ) { org . junit . Assert . assertTrue ( called ) ; org . junit . Assert . assertEquals ( ( ( ( "Invalid<sp>arg.<sp>Expected:<sp>" + ( expectedId ) ) + "<sp>actual:<sp>" ) + ( expectedId ) ) , expectedId , actualId ) ; }
|
org . junit . Assert . assertFalse ( result )
|
shouldHaveHighlightButNoStyleWhenServerDefault ( ) { com . couchbase . client . java . search . SearchQuery p = new com . couchbase . client . java . search . SearchQuery ( null , null ) . highlight ( HighlightStyle . SERVER_DEFAULT ) ; com . couchbase . client . java . document . json . JsonObject result = com . couchbase . client . java . document . json . JsonObject . empty ( ) ; p . injectParams ( result ) ; com . couchbase . client . java . document . json . JsonObject expected = com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "highlight" , com . couchbase . client . java . document . json . JsonObject . empty ( ) ) ; "<AssertPlaceHolder>" ; } empty ( ) { return new com . couchbase . client . java . document . json . JsonObject ( ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
getGroup ( ) { org . gitlab4j . api . models . Group group = org . gitlab4j . api . TestGroupApi . gitLabApi . getGroupApi ( ) . getGroup ( org . gitlab4j . api . TestGroupApi . TEST_GROUP ) ; "<AssertPlaceHolder>" ; } getGroup ( java . lang . Object ) { javax . ws . rs . core . Response response = get ( Response . Status . OK , null , "groups" , getGroupIdOrPath ( groupIdOrPath ) ) ; return response . readEntity ( org . gitlab4j . api . models . Group . class ) ; }
|
org . junit . Assert . assertNotNull ( group )
|
testExecutionTimesWithIncrementsGreaterThanDaysOfMonth ( ) { final int increment = 56 ; final java . lang . String incrementGreaterDaysOfMonthStartingWithFirstDayOfYear = "0<sp>0<sp>0<sp>?<sp>*<sp>?<sp>*<sp>1/" + increment ; final com . cronutils . model . time . ExecutionTime executionTime = com . cronutils . model . time . ExecutionTime . forCron ( parser . parse ( incrementGreaterDaysOfMonthStartingWithFirstDayOfYear ) ) ; java . time . ZonedDateTime start = java . time . ZonedDateTime . of ( 2017 , 1 , 1 , 0 , 0 , 0 , 0 , com . cronutils . model . time . UTC ) ; for ( int i = 0 ; i < 6 ; i ++ ) { final java . time . ZonedDateTime expected = start ; final java . util . Optional < java . time . ZonedDateTime > nextExecution = executionTime . nextExecution ( start . minusSeconds ( 1 ) ) ; if ( nextExecution . isPresent ( ) ) { final java . time . ZonedDateTime actual = nextExecution . get ( ) ; "<AssertPlaceHolder>" ; start = expected . plusDays ( increment ) ; } else { org . junit . Assert . fail ( com . cronutils . model . time . ExecutionTimeQuartzWithDayOfYearExtensionIntegrationTest . NEXT_EXECUTION_NOT_PRESENT_ERROR ) ; } } } nextExecution ( java . time . ZonedDateTime ) { com . cronutils . utils . Preconditions . checkNotNull ( date ) ; try { java . time . ZonedDateTime nextMatch = nextClosestMatch ( date ) ; if ( nextMatch . equals ( date ) ) { nextMatch = nextClosestMatch ( date . plusSeconds ( 1 ) ) ; } return java . util . Optional . of ( nextMatch ) ; } catch ( final com . cronutils . model . time . generator . NoSuchValueException e ) { return java . util . Optional . empty ( ) ; } }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testBrpOuder2GezagInhoud ( ) { nl . moderniseringgba . migratie . testutils . EqualsAndHashcodeTester . testEqualsHashcodeAndToString ( new nl . moderniseringgba . migratie . conversie . proces . brpnaarlo3 . groep . BrpOuder2GezagInhoud ( Boolean . TRUE ) , new nl . moderniseringgba . migratie . conversie . proces . brpnaarlo3 . groep . BrpOuder2GezagInhoud ( Boolean . TRUE ) , new nl . moderniseringgba . migratie . conversie . proces . brpnaarlo3 . groep . BrpOuder2GezagInhoud ( Boolean . FALSE ) ) ; "<AssertPlaceHolder>" ; } isLeeg ( ) { return false ; }
|
org . junit . Assert . assertFalse ( new nl . moderniseringgba . migratie . conversie . proces . brpnaarlo3 . groep . BrpOuder2GezagInhoud ( Boolean . TRUE ) . isLeeg ( ) )
|
mustNotReleaseLocksAfterPrepareOnStop ( ) { clientA . acquireShared ( org . neo4j . kernel . impl . locking . StopCompatibility . TRACER , org . neo4j . kernel . impl . locking . ResourceTypes . NODE , 1L ) ; clientA . acquireExclusive ( org . neo4j . kernel . impl . locking . StopCompatibility . TRACER , org . neo4j . kernel . impl . locking . ResourceTypes . NODE , 2L ) ; clientA . prepare ( ) ; clientA . stop ( ) ; org . neo4j . kernel . impl . locking . LockCountVisitor lockCountVisitor = new org . neo4j . kernel . impl . locking . LockCountVisitor ( ) ; locks . accept ( lockCountVisitor ) ; "<AssertPlaceHolder>" ; } getLockCount ( ) { return lockCount ; }
|
org . junit . Assert . assertEquals ( 2 , lockCountVisitor . getLockCount ( ) )
|
getIotHubsWorks ( tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . SymmetricKeyAttestation ) { java . util . List < java . lang . String > expectedIotHubs = new java . util . ArrayList ( ) ; tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . EnrollmentGroup enrollmentGroup = new tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . EnrollmentGroup ( "1234" , mockedAttestation ) ; tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . Deencapsulation . setField ( enrollmentGroup , "iotHubs" , expectedIotHubs ) ; java . util . Collection < java . lang . String > actualIotHubs = enrollmentGroup . getIotHubs ( ) ; "<AssertPlaceHolder>" ; } getIotHubs ( ) { return this . iotHubs ; }
|
org . junit . Assert . assertEquals ( expectedIotHubs , actualIotHubs )
|
testCanStopAComponentThatWasNeverStartedBecauseItHasNoLifecycle ( ) { com . picocontainer . MutablePicoContainer pico = new com . picocontainer . DefaultPicoContainer ( ) ; pico . addComponent ( com . picocontainer . behaviors . StringBuffer . class ) ; pico . start ( ) ; "<AssertPlaceHolder>" ; pico . stop ( ) ; pico . dispose ( ) ; } getComponent ( java . lang . Class ) { checkReadPermission ( ) ; return pico . getComponent ( componentType ) ; }
|
org . junit . Assert . assertNotNull ( pico . getComponent ( com . picocontainer . behaviors . StringBuffer . class ) )
|
testDDLVDBImportTransitive ( ) { es . start ( new org . teiid . runtime . EmbeddedConfiguration ( ) ) ; java . lang . String ddl1 = "CREATE<sp>DATABASE<sp>x<sp>VERSION<sp>'1';" + ( ( ( "USE<sp>DATABASE<sp>x<sp>VERSION<sp>'1';" + "CREATE<sp>VIRTUAL<sp>SCHEMA<sp>test2;" ) + "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" 5 ) + "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" 7 ) ; java . lang . String ddl2 = "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" 6 + ( "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" + "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" 3 ) ; java . lang . String ddl3 = "CREATE<sp>DATABASE<sp>test2<sp>VERSION<sp>'1';" + ( "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" 4 + "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" 3 ) ; java . lang . String ddl4 = "CREATE<sp>DATABASE<sp>test3<sp>VERSION<sp>'1';" + ( ( "USE<sp>DATABASE<sp>test3<sp>VERSION<sp>'1';" + "IMPORT<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" ) + "IMPORT<sp>DATABASE<sp>test2<sp>VERSION<sp>'1';" ) ; es . deployVDB ( new java . io . ByteArrayInputStream ( ddl1 . getBytes ( "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" 0 ) ) , true ) ; es . deployVDB ( new java . io . ByteArrayInputStream ( ddl2 . getBytes ( "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" 0 ) ) , true ) ; es . deployVDB ( new java . io . ByteArrayInputStream ( ddl3 . getBytes ( "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" 0 ) ) , true ) ; es . deployVDB ( new java . io . ByteArrayInputStream ( ddl4 . getBytes ( "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" 0 ) ) , true ) ; org . teiid . runtime . ResultSet rs = es . getDriver ( ) . connect ( "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" 1 , null ) . createStatement ( ) . executeQuery ( "select<sp>*<sp>from<sp>x" ) ; rs . next ( ) ; "<AssertPlaceHolder>" ; } getString ( java . lang . Object ) { return org . teiid . jdbc . DataTypeTransformer . transform ( value , java . lang . String . class ) ; }
|
org . junit . Assert . assertEquals ( "USE<sp>DATABASE<sp>test<sp>VERSION<sp>'1';" 2 , rs . getString ( 1 ) )
|
testHasX ( ) { com . eclipsesource . tabris . passepartout . Bounds bounds = new com . eclipsesource . tabris . passepartout . Bounds ( 23 , 42 , 123 , 142 ) ; int x = bounds . getX ( ) ; "<AssertPlaceHolder>" ; } getX ( ) { return x ; }
|
org . junit . Assert . assertEquals ( 23 , x )
|
testPerformNotificationActionInvalidParamsDto ( ) { org . finra . herd . service . NotificationActionService notificationActionService = notificationActionFactory . getNotificationActionHandler ( NotificationTypeEntity . NOTIFICATION_TYPE_BDATA , NotificationEventTypeEntity . EventTypesBdata . BUS_OBJCT_DATA_RGSTN . name ( ) ) ; try { notificationActionService . performNotificationAction ( new org . finra . herd . model . dto . StorageUnitNotificationEventParamsDto ( ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalStateException e ) { "<AssertPlaceHolder>" ; } } performNotificationAction ( org . finra . herd . model . dto . NotificationEventParamsDto ) { if ( notificationEventParams instanceof org . finra . herd . model . dto . BusinessObjectDataNotificationEventParamsDto ) { org . finra . herd . model . dto . BusinessObjectDataNotificationEventParamsDto businessObjectDataNotificationEventParams = ( ( org . finra . herd . model . dto . BusinessObjectDataNotificationEventParamsDto ) ( notificationEventParams ) ) ; org . finra . herd . model . api . xml . JobCreateRequest request = new org . finra . herd . model . api . xml . JobCreateRequest ( ) ; org . finra . herd . model . jpa . JobDefinitionEntity jobDefinitionEntity = businessObjectDataNotificationEventParams . getNotificationJobAction ( ) . getJobDefinition ( ) ; request . setNamespace ( jobDefinitionEntity . getNamespace ( ) . getCode ( ) ) ; request . setJobName ( jobDefinitionEntity . getName ( ) ) ; request . setParameters ( buildJobParameters ( businessObjectDataNotificationEventParams ) ) ; if ( org . finra . herd . service . impl . BusinessObjectDataNotificationJobActionServiceImpl . LOGGER . isInfoEnabled ( ) ) { org . finra . herd . model . jpa . BusinessObjectDataNotificationRegistrationEntity businessObjectDataNotificationRegistration = businessObjectDataNotificationEventParams . getBusinessObjectDataNotificationRegistration ( ) ; org . finra . herd . service . impl . BusinessObjectDataNotificationJobActionServiceImpl . LOGGER . info ( "Starting<sp>a<sp>job<sp>due<sp>to<sp>a<sp>notification.<sp>notificationRegistrationKey={}<sp>jobCreateRequest={}" , jsonHelper . objectToJson ( notificationRegistrationHelper . getNotificationRegistrationKey ( businessObjectDataNotificationRegistration ) ) , jsonHelper . objectToJson ( request ) ) ; } return jobService . createAndStartJob ( request ) ; } else { throw new java . lang . IllegalStateException ( "Notification<sp>event<sp>parameters<sp>DTO<sp>passed<sp>to<sp>the<sp>method<sp>must<sp>be<sp>an<sp>instance<sp>of<sp>BusinessObjectDataNotificationEventParamsDto." ) ; } }
|
org . junit . Assert . assertEquals ( "Notification<sp>event<sp>parameters<sp>DTO<sp>passed<sp>to<sp>the<sp>method<sp>must<sp>be<sp>an<sp>instance<sp>of<sp>BusinessObjectDataNotificationEventParamsDto." , e . getMessage ( ) )
|
test ( ) { final org . mwg . Graph graph = new org . mwg . GraphBuilder ( ) . withPlugin ( new org . mwg . mlx . MLXPlugin ( ) ) . withScheduler ( new org . mwg . internal . scheduler . NoopScheduler ( ) ) . build ( ) ; graph . connect ( new org . mwg . Callback < java . lang . Boolean > ( ) { @ ml . classifier . Override public void on ( java . lang . Boolean result ) { org . mwg . mlx . algorithm . classifier . GaussianClassifierNode gaussianClassifierNode = ( ( org . mwg . mlx . algorithm . classifier . GaussianClassifierNode ) ( graph . newTypedNode ( 0 , 0 , GaussianClassifierNode . NAME ) ) ) ; standardSettings ( gaussianClassifierNode ) ; ml . classifier . ClassificationJumpCallback cjc = runThroughDummyDataset ( gaussianClassifierNode ) ; gaussianClassifierNode . free ( ) ; graph . disconnect ( null ) ; "<AssertPlaceHolder>" ; } } ) ; } disconnect ( greycat . Callback ) { if ( callback != null ) { callback . on ( true ) ; } }
|
org . junit . Assert . assertTrue ( ( ( cjc . errors ) <= 1 ) )
|
withDescription_shouldSetDescription ( ) { org . eclipse . smarthome . core . thing . type . ThingType thingType = builder . withDescription ( org . eclipse . smarthome . core . thing . type . ThingTypeBuilderTest . DESCRIPTION ) . build ( ) ; "<AssertPlaceHolder>" ; } getDescription ( ) { return description ; }
|
org . junit . Assert . assertThat ( thingType . getDescription ( ) , org . hamcrest . CoreMatchers . is ( org . eclipse . smarthome . core . thing . type . ThingTypeBuilderTest . DESCRIPTION ) )
|
testDisabledCleanupDelay ( ) { config . setCleanupDelay ( org . eclipse . jgit . lib . RepositoryCacheConfig . NO_CLEANUP ) ; "<AssertPlaceHolder>" ; } getCleanupDelay ( ) { if ( ( cleanupDelayMillis ) < 0 ) { return java . lang . Math . min ( ( ( expireAfterMillis ) / 10 ) , TimeUnit . MINUTES . toMillis ( 10 ) ) ; } return cleanupDelayMillis ; }
|
org . junit . Assert . assertEquals ( org . eclipse . jgit . lib . RepositoryCacheConfig . NO_CLEANUP , config . getCleanupDelay ( ) )
|
testGetAllGroupedUnAllowedGroup ( ) { for ( org . opengrok . indexer . configuration . Group g : org . opengrok . indexer . configuration . RuntimeEnvironment . getInstance ( ) . getGroups ( ) ) { if ( g . getName ( ) . startsWith ( "group_0" ) ) { "<AssertPlaceHolder>" ; break ; } } } getAllGrouped ( org . opengrok . indexer . configuration . Group ) { if ( ! ( cfg . isAllowed ( g ) ) ) { return new java . util . TreeSet ( ) ; } return org . opengrok . indexer . web . ProjectHelper . mergeProjects ( filterProjects ( g . getProjects ( ) ) , filterProjects ( g . getRepositories ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , helper . getAllGrouped ( g ) . size ( ) )
|
sum_A$_String ( ) { com . m3 . scalaflavor4j . IndexedSeq < java . lang . String > seq = com . m3 . scalaflavor4j . IndexedSeq . apply ( "a" , "b" , "c" ) ; com . m3 . scalaflavor4j . SNum actual = seq . sum ( ) ; "<AssertPlaceHolder>" ; } toInt ( ) { return value . intValue ( ) ; }
|
org . junit . Assert . assertThat ( actual . toInt ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 6 ) ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.