input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testMultiDomainNoCompatibleProviderFoundSetOnInvocationHandler ( ) { final java . util . Set < java . lang . String > domains = new java . util . HashSet ( java . util . Arrays . asList ( "domain-1" , "domain-2" ) ) ; setup ( domains ) ; final java . util . concurrent . ExecutorService executor = java . util . concurrent . Executors . newSingleThreadExecutor ( ) ; doAnswer ( new org . mockito . stubbing . Answer < java . lang . Void > ( ) { @ io . joynr . proxy . Override public io . joynr . proxy . Void answer ( org . mockito . invocation . InvocationOnMock invocation ) throws java . lang . Throwable { executor . submit ( new java . util . concurrent . Callable < java . lang . Void > ( ) { @ io . joynr . proxy . Override public io . joynr . proxy . Void call ( ) throws io . joynr . proxy . Exception { java . lang . Thread . sleep ( 10L ) ; verify ( arbitrator ) . setArbitrationListener ( arbitrationCallbackCaptor . capture ( ) ) ; io . joynr . arbitration . ArbitrationCallback callback = arbitrationCallbackCaptor . getValue ( ) ; java . util . Map < java . lang . String , java . util . Set < joynr . types . Version > > versionsByDomain = new java . util . HashMap ( ) ; java . util . HashSet < joynr . types . Version > discoveredVersions = new java . util . HashSet ( java . util . Arrays . asList ( new joynr . types . Version ( 100 , 100 ) ) ) ; java . util . Map < java . lang . String , io . joynr . exceptions . NoCompatibleProviderFoundException > exceptionsByDomain = new java . util . HashMap ( ) ; for ( java . lang . String domain : domains ) { versionsByDomain . put ( domain , discoveredVersions ) ; exceptionsByDomain . put ( domain , new io . joynr . exceptions . NoCompatibleProviderFoundException ( "interfaceName" , new joynr . types . Version ( 1 , 1 ) , domain , discoveredVersions ) ) ; } callback . onError ( new io . joynr . exceptions . MultiDomainNoCompatibleProviderFoundException ( exceptionsByDomain ) ) ; return null ; } } ) ; return null ; } } ) . when ( arbitrator ) . scheduleArbitration ( ) ; subject . build ( proxyCreatedCallback ) ; executor . shutdown ( ) ; executor . awaitTermination ( 100L , TimeUnit . MILLISECONDS ) ; verify ( proxyCreatedCallback ) . onProxyCreationError ( exceptionCaptor . capture ( ) ) ; io . joynr . exceptions . JoynrRuntimeException capturedException = exceptionCaptor . getValue ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertTrue ( ( capturedException instanceof io . joynr . exceptions . MultiDomainNoCompatibleProviderFoundException ) )
testTrue ( ) { setup ( true , true ) ; org . mockito . Mockito . when ( persoon . getAdministratienummer ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . ANUMMER ) ; org . mockito . Mockito . when ( persoon . getBurgerservicenummer ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . BSN ) ; org . mockito . Mockito . when ( persoon . getDatumGeboorte ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . GEBOORTE_DATUM . intValue ( ) ) ; org . mockito . Mockito . when ( persoon . getGemeenteGeboorte ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . GEBOORTE_PLAATS ) ; org . mockito . Mockito . when ( persoon . getLandOfGebiedGeboorte ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . GEBOORTE_LAND ) ; 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 . PersoonType persoonType = new nl . bzk . migratiebrp . bericht . model . sync . generated . PersoonType ( ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . IdentificatienummersGroepType identificatieNummers = new nl . bzk . migratiebrp . bericht . model . sync . generated . IdentificatienummersGroepType ( ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . GeboorteGroepType geboorte = new nl . bzk . migratiebrp . bericht . model . sync . generated . GeboorteGroepType ( ) ; identificatieNummers . setANummer ( java . lang . String . valueOf ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . ANUMMER ) ) ; identificatieNummers . setBurgerservicenummer ( java . lang . String . valueOf ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . BSN ) ) ; geboorte . setDatum ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . GEBOORTE_DATUM ) ; geboorte . setLand ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . LAND_CODE ) ; geboorte . setPlaats ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . GEMEENTE_CODE ) ; persoonType . setIdentificatienummers ( identificatieNummers ) ; persoonType . setGeboorte ( geboorte ) ; verzoek . setPersoon ( persoonType ) ; "<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 ) )
sequenceTest ( ) { int [ ] ints = java . util . stream . IntStream . rangeClosed ( 1 , 20 ) . map ( ( n ) -> n * 3 ) . toArray ( ) ; log . debug ( "ints<sp>=<sp>{}" , ints ) ; "<AssertPlaceHolder>" ; java . lang . String string = "Hello<sp>My<sp>name<sp>Is<sp>Liangyong<sp>what<sp>Is<sp>Your<sp>Name" ; com . yong . orders . demo . List < java . lang . String > collect = com . yong . orders . demo . Arrays . stream ( string . split ( "<sp>" ) ) . map ( String :: toLowerCase ) . distinct ( ) . sorted ( com . yong . orders . demo . Comparator . comparing ( String :: length ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; log . debug ( "String<sp>textWord<sp>=<sp>{}" , collect ) ; }
org . junit . Assert . assertTrue ( true )
testLift ( ) { final fj . data . List . List < java . lang . Integer > list1 = list ( 1 , 2 , 3 ) ; final fj . data . List . List < java . lang . Integer > list2 = list ( 4 , 5 , 6 ) ; final fj . data . List . List < java . lang . Integer > list3 = lift ( addInts ) . f ( list1 , list2 ) ; "<AssertPlaceHolder>" ; } j ( fj . data . List$List ) { return gov . nasa . ensemble . common . functional . Lists . < A > toJavaList ( ) . f ( as ) ; }
org . junit . Assert . assertEquals ( gov . nasa . ensemble . common . functional . Lists . Lists . j ( list ( 5 , 6 , 7 , 6 , 7 , 8 , 7 , 8 , 9 ) ) , gov . nasa . ensemble . common . functional . Lists . Lists . j ( list3 ) )
selectService ( ) { initDataForSelectService ( ) ; doNothing ( ) . when ( bean ) . addMessage ( any ( javax . faces . application . FacesMessage . Severity . class ) , anyString ( ) ) ; java . lang . String result = bean . selectService ( ) ; "<AssertPlaceHolder>" ; } selectService ( ) { org . oscm . ui . model . Service svc = model . getService ( ) ; if ( ( svc != null ) && ( model . getUseExternalConfigurator ( ) ) ) { boolean validationError = false ; java . util . List < org . oscm . internal . vo . VOParameter > voParameters = svc . getVO ( ) . getParameters ( ) ; for ( org . oscm . internal . vo . VOParameter parameter : voParameters ) { if ( ( parameter . getParameterDefinition ( ) . isMandatory ( ) ) && ( ( ( parameter . getValue ( ) ) == null ) || ( parameter . getValue ( ) . isEmpty ( ) ) ) ) { validationError = true ; break ; } } if ( validationError ) { addMessage ( FacesMessage . SEVERITY_ERROR , org . oscm . ui . dialog . mp . subscriptionwizard . ERROR_INVALID_CONFIGURED_PARAMETERS ) ; return "" ; } } model . setReadOnlyParams ( true ) ; org . oscm . internal . vo . VOUserDetails voUserDetails = ui . getUserFromSessionWithoutException ( ) ; if ( ( ! ( canUserSubscribeWithoutUnitSelection ( voUserDetails ) ) ) && ( ( subscriptionUnitCtrl . getModel ( ) . getSelectedUnitId ( ) ) == 0L ) ) { addMessage ( FacesMessage . SEVERITY_ERROR , org . oscm . ui . dialog . mp . subscriptionwizard . ERROR_TO_PROCEED_SELECT_UNIT ) ; return "" ; } updateSelectedUnit ( ) ; if ( isPaymentConfigurationHidden ( ) ) { return OUTCOME_SUCCESS ; } if ( ( svc != null ) && ( svc . getPriceModel ( ) . isChargeable ( ) ) ) { return OUTCOME_ENTER_PAYMENT ; } return OUTCOME_SUCCESS ; }
org . junit . Assert . assertEquals ( "" , result )
testGetAreaAtWhitParentLL ( ) { when ( lienzoLayer . getLienzoLayer ( ) . getLayer ( ) . findShapeAtPoint ( eq ( 20 ) , eq ( 120 ) ) ) . thenReturn ( shape ) ; org . kie . workbench . common . stunner . core . graph . Node < org . kie . workbench . common . stunner . core . graph . content . view . View < ? > , org . kie . workbench . common . stunner . core . graph . Edge > node = canvasBoundsIndexerImpl . getAt ( 20 , 20 , 100 , 100 , parentNode ) ; "<AssertPlaceHolder>" ; } getAt ( double , double , double , double , org . kie . workbench . common . stunner . core . graph . Element ) { org . kie . workbench . common . stunner . core . graph . content . view . Point2D parentNodePosition ; double xToCheck = 0 ; double yToCheck = 0 ; if ( parentNode != null ) { parentNodePosition = org . kie . workbench . common . stunner . core . graph . util . GraphUtils . getComputedPosition ( parentNode . asNode ( ) ) ; xToCheck = x + ( parentNodePosition . getX ( ) ) ; yToCheck = y + ( parentNodePosition . getY ( ) ) ; } org . kie . workbench . common . stunner . core . graph . Node < org . kie . workbench . common . stunner . core . graph . content . view . View < ? > , org . kie . workbench . common . stunner . core . graph . Edge > element ; org . kie . workbench . common . stunner . core . graph . content . view . Point2D [ ] pointsToCheck = new org . kie . workbench . common . stunner . core . graph . content . view . Point2D [ 5 ] ; pointsToCheck [ 0 ] = new org . kie . workbench . common . stunner . core . graph . content . view . Point2D ( xToCheck , yToCheck ) ; pointsToCheck [ 1 ] = new org . kie . workbench . common . stunner . core . graph . content . view . Point2D ( ( xToCheck + width ) , yToCheck ) ; pointsToCheck [ 2 ] = new org . kie . workbench . common . stunner . core . graph . content . view . Point2D ( ( xToCheck + ( width / 2 ) ) , ( yToCheck + ( height / 2 ) ) ) ; pointsToCheck [ 3 ] = new org . kie . workbench . common . stunner . core . graph . content . view . Point2D ( xToCheck , ( yToCheck + height ) ) ; pointsToCheck [ 4 ] = new org . kie . workbench . common . stunner . core . graph . content . view . Point2D ( ( xToCheck + width ) , ( yToCheck + height ) ) ; for ( org . kie . workbench . common . stunner . core . graph . content . view . Point2D point : pointsToCheck ) { element = findElementAt ( point . getX ( ) , point . getY ( ) ) ; if ( element != null ) { if ( element != parentNode ) { return element ; } } } return null ; }
org . junit . Assert . assertNotNull ( node )
testOnInventoryCloseNoPanels ( ) { world . bentobox . bentobox . listeners . PanelListenerManager . getOpenPanels ( ) . put ( java . util . UUID . randomUUID ( ) , panel ) ; org . bukkit . event . inventory . InventoryCloseEvent event = new org . bukkit . event . inventory . InventoryCloseEvent ( view ) ; plm . onInventoryClose ( event ) ; "<AssertPlaceHolder>" ; } getOpenPanels ( ) { return world . bentobox . bentobox . listeners . PanelListenerManager . openPanels ; }
org . junit . Assert . assertTrue ( ( ( world . bentobox . bentobox . listeners . PanelListenerManager . getOpenPanels ( ) . size ( ) ) == 1 ) )
testPerfectRelatie ( ) { final nl . bzk . brp . model . bericht . kern . PersoonBericht berichtMoeder = maakMoeder ( ) ; final nl . bzk . brp . model . bericht . kern . PersoonBericht berichtVader = maakVader ( ) ; final nl . bzk . brp . util . RelatieBuilder < nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht > relBuilder = new nl . bzk . brp . util . RelatieBuilder ( ) ; final nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht nieuweSituatie = relBuilder . bouwFamilieRechtelijkeBetrekkingRelatie ( ) . voegOuderToe ( berichtMoeder ) . voegOuderToe ( berichtVader ) . voegKindToe ( maakKind ( ) ) . getRelatie ( ) ; zetOuderMoederAlsIndicatieAdresHoudend ( nieuweSituatie , berichtMoeder ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > objecten = brby0168 . voerRegelUit ( null , nieuweSituatie , maakStandaardActie ( ) , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , objecten . size ( ) )
singleRoleExists ( ) { net . jforum . entities . Group g = new net . jforum . entities . Group ( ) ; g . addRole ( this . newRole ( "role1" ) ) ; net . jforum . security . RoleManager manager = new net . jforum . security . RoleManager ( ) ; manager . setGroups ( java . util . Arrays . asList ( g ) ) ; "<AssertPlaceHolder>" ; } roleExists ( java . lang . String ) { return ( this . get ( name ) ) != null ; }
org . junit . Assert . assertTrue ( manager . roleExists ( "role1" ) )
testIsSatisfied ( ) { org . osgi . framework . Bundle bundle = mock ( org . osgi . framework . Bundle . class ) ; java . util . Map < java . security . cert . X509Certificate , java . util . List < java . security . cert . X509Certificate > > trustedCerts = new java . util . HashMap ( ) ; java . security . cert . X509Certificate key = new sun . security . x509 . X509CertImpl ( org . codice . ddf . condition . SignerConditionTest . class . getResourceAsStream ( "/asdf.der" ) ) ; trustedCerts . put ( key , new java . util . ArrayList ( ) ) ; when ( bundle . getSignerCertificates ( org . osgi . framework . Bundle . SIGNERS_TRUSTED ) ) . thenReturn ( trustedCerts ) ; org . codice . ddf . condition . SignerCondition principalCondition = new org . codice . ddf . condition . SignerCondition ( bundle , new org . osgi . service . condpermadmin . ConditionInfo ( org . codice . ddf . condition . SignerCondition . class . getName ( ) , new java . lang . String [ ] { "asdf" } ) ) ; boolean satisfied = principalCondition . isSatisfied ( ) ; "<AssertPlaceHolder>" ; } isSatisfied ( ) { return ! ( java . lang . System . getProperty ( org . codice . ddf . itests . common . annotations . SkipUnstableTest . INCLUDE_UNSTABLE_TESTS_PROPERTY , "false" ) . equals ( "true" ) ) ; }
org . junit . Assert . assertThat ( satisfied , org . hamcrest . core . Is . is ( true ) )
testGetGravityCentre ( ) { sh1 . setPosition ( 33.0 , ( - 13.0 ) ) ; shape . addShape ( sh1 ) ; shape . addShape ( sh2 ) ; "<AssertPlaceHolder>" ; } getGravityCentre ( ) { return isEmpty ( ) ? ShapeFactory . INST . createPoint ( ) : getTopLeftPoint ( ) . getMiddlePoint ( getBottomRightPoint ( ) ) ; }
org . junit . Assert . assertEquals ( sh1 . getGravityCentre ( ) . getMiddlePoint ( sh2 . getGravityCentre ( ) ) , shape . getGravityCentre ( ) )
findNeighborsExcludingDirection ( ) { try ( org . neo4j . graphdb . Transaction tx = api . beginTx ( ) ) { org . neo4j . graphdb . Node node1 = api . createNode ( ) ; org . neo4j . graphdb . Node node2 = api . createNode ( ) ; org . neo4j . graphdb . Node node3 = api . createNode ( ) ; org . neo4j . graphdb . Node node4 = api . createNode ( ) ; node1 . createRelationshipTo ( node3 , org . neo4j . graphalgo . algo . linkprediction . NeighborsFinderTest . FRIEND ) ; node2 . createRelationshipTo ( node3 , org . neo4j . graphalgo . algo . linkprediction . NeighborsFinderTest . FRIEND ) ; node1 . createRelationshipTo ( node4 , org . neo4j . graphalgo . algo . linkprediction . NeighborsFinderTest . COLLEAGUE ) ; node2 . createRelationshipTo ( node4 , org . neo4j . graphalgo . algo . linkprediction . NeighborsFinderTest . COLLEAGUE ) ; tx . success ( ) ; } org . neo4j . graphalgo . linkprediction . NeighborsFinder neighborsFinder = new org . neo4j . graphalgo . linkprediction . NeighborsFinder ( api ) ; try ( org . neo4j . graphdb . Transaction tx = api . beginTx ( ) ) { org . neo4j . graphdb . Node node1 = api . getNodeById ( 0 ) ; org . neo4j . graphdb . Node node2 = api . getNodeById ( 1 ) ; java . util . Set < org . neo4j . graphdb . Node > neighbors = neighborsFinder . findCommonNeighbors ( node1 , node2 , null , Direction . BOTH ) ; "<AssertPlaceHolder>" ; } } size ( ) { return size ; }
org . junit . Assert . assertEquals ( 2 , neighbors . size ( ) )
shouldFetchFormSubmissionsByGiven ( ) { long baseTimeStamp = org . motechproject . util . DateUtil . now ( ) . getMillis ( ) ; org . ei . drishti . dto . form . FormSubmissionDTO firstFormSubmissionDTO = new org . ei . drishti . dto . form . FormSubmissionDTO ( "anm<sp>id<sp>1" , "instance<sp>id<sp>1" , "entity<sp>id<sp>1" , "form<sp>name<sp>1" , "" , java . lang . String . valueOf ( baseTimeStamp ) , "1" ) . withServerVersion ( "0" ) ; org . ei . drishti . dto . form . FormSubmissionDTO secondFormSubmissionDTO = new org . ei . drishti . dto . form . FormSubmissionDTO ( "anm<sp>id<sp>2" , "instance<sp>id<sp>2" , "entity<sp>id<sp>2" , "form<sp>name<sp>1" , "" , java . lang . String . valueOf ( ( baseTimeStamp + 1 ) ) , "1" ) . withServerVersion ( "1" ) ; org . ei . drishti . form . domain . FormSubmission firstFormSubmission = new org . ei . drishti . form . domain . FormSubmission ( "anm<sp>id<sp>1" , "instance<sp>id<sp>1" , "form<sp>name<sp>1" , "entity<sp>id<sp>1" , baseTimeStamp , "1" , null , 0L ) ; org . ei . drishti . form . domain . FormSubmission secondFormSubmission = new org . ei . drishti . form . domain . FormSubmission ( "anm<sp>id<sp>2" , "instance<sp>id<sp>2" , "form<sp>name<sp>1" , "entity<sp>id<sp>2" , ( baseTimeStamp + 1 ) , "1" , null , 1L ) ; when ( allFormSubmissions . findByServerVersion ( 0L ) ) . thenReturn ( asList ( firstFormSubmission , secondFormSubmission ) ) ; java . util . List < org . ei . drishti . dto . form . FormSubmissionDTO > formSubmissionDTOs = formSubmissionService . fetch ( 0L ) ; "<AssertPlaceHolder>" ; } fetch ( long ) { return ch . lambdaj . collection . LambdaCollections . with ( allFormSubmissions . findByServerVersion ( formFetchToken ) ) . convert ( new ch . lambdaj . function . convert . Converter < org . ei . drishti . form . domain . FormSubmission , org . ei . drishti . dto . form . FormSubmissionDTO > ( ) { @ org . ei . drishti . form . service . Override public org . ei . drishti . dto . form . FormSubmissionDTO convert ( org . ei . drishti . form . domain . FormSubmission submission ) { return org . ei . drishti . form . service . FormSubmissionConverter . from ( submission ) ; } } ) ; }
org . junit . Assert . assertEquals ( asList ( firstFormSubmissionDTO , secondFormSubmissionDTO ) , formSubmissionDTOs )
testTrimQueueNameEquals ( ) { final java . lang . String [ ] equalsStrings = new java . lang . String [ ] { "a" , "<sp>a" , "<sp>γ€€a" , "  \rΒ…β€Šβ€…β€€γ€€a" , "
 γ€€β€ˆβ€ƒβŸγ€€αš€a" , "<sp>a" 1 , "    
\n  a" , "aβ€Š" , "a<sp>Β…<sp>" , "<sp>a<sp>" , "<sp>a" 0 , "<sp>a" 1 + "    
\n  " } ; for ( java . lang . String s : equalsStrings ) { "<AssertPlaceHolder>" ; } } trimQueueName ( java . lang . String ) { if ( name == null ) { return null ; } int start = 0 ; while ( ( ( start < ( name . length ( ) ) ) && ( org . apache . hadoop . yarn . server . resourcemanager . scheduler . fair . FairSchedulerUtilities . isWhitespace ( name . charAt ( start ) ) ) ) && ( start < ( name . length ( ) ) ) ) { start ++ ; } int end = ( name . length ( ) ) - 1 ; while ( ( ( end >= 0 ) && ( org . apache . hadoop . yarn . server . resourcemanager . scheduler . fair . FairSchedulerUtilities . isWhitespace ( name . charAt ( end ) ) ) ) && ( end > start ) ) { end -- ; } return name . substring ( start , ( end + 1 ) ) ; }
org . junit . Assert . assertEquals ( "a" , org . apache . hadoop . yarn . server . resourcemanager . scheduler . fair . FairSchedulerUtilities . trimQueueName ( s ) )
testGetPayloadTypeReturnsTheTypeOfTheInsertedCommand ( ) { org . axonframework . commandhandling . CommandMessage < org . axonframework . axonserver . connector . command . GrpcBackedCommandMessageTest . TestCommand > testCommandMessage = org . axonframework . commandhandling . GenericCommandMessage . asCommandMessage ( org . axonframework . axonserver . connector . command . GrpcBackedCommandMessageTest . TEST_COMMAND ) ; io . axoniq . axonserver . grpc . command . Command testCommand = commandSerializer . serialize ( testCommandMessage , org . axonframework . axonserver . connector . command . GrpcBackedCommandMessageTest . ROUTING_KEY , org . axonframework . axonserver . connector . command . GrpcBackedCommandMessageTest . PRIORITY ) ; org . axonframework . axonserver . connector . command . GrpcBackedCommandMessage < org . axonframework . axonserver . connector . command . GrpcBackedCommandMessageTest . TestCommand > testSubject = new org . axonframework . axonserver . connector . command . GrpcBackedCommandMessage ( testCommand , serializer ) ; "<AssertPlaceHolder>" ; } getPayloadType ( ) { return payloadType ; }
org . junit . Assert . assertEquals ( org . axonframework . axonserver . connector . command . GrpcBackedCommandMessageTest . TestCommand . class , testSubject . getPayloadType ( ) )
testReadJsonSingular ( ) { java . lang . String json = "{\n" + ( ( ( ( "<sp>\"id\"<sp>:<sp>\"_id\",\n" + "<sp>\"revision\"<sp>:<sp>17,\n" ) + "<sp>\"lang\"<sp>:<sp>\"es-ES\",\n" ) + "<sp>\"content\"<sp>:<sp>\"single\"\n" ) + "}" ) ; org . zanata . rest . dto . resource . TextFlow tf = om . readValue ( json , org . zanata . rest . dto . resource . TextFlow . class ) ; org . zanata . rest . dto . resource . TextFlow expected = new org . zanata . rest . dto . resource . TextFlow ( "_id" , esES , "single" ) ; expected . setRevision ( 17 ) ; "<AssertPlaceHolder>" ; } setRevision ( java . lang . Integer ) { this . revision = revision ; }
org . junit . Assert . assertEquals ( tf , expected )
testNullCookieParam ( ) { org . jboss . resteasy . client . jaxrs . ResteasyWebTarget target = ( ( org . jboss . resteasy . client . jaxrs . ResteasyWebTarget ) ( client . target ( generateBaseUrl ( ) ) ) ) ; org . jboss . resteasy . test . resource . param . resource . ParamInterfaceResource proxy = target . proxy ( org . jboss . resteasy . test . resource . param . resource . ParamInterfaceResource . class ) ; java . lang . String rtn = proxy . getCookie ( null ) ; "<AssertPlaceHolder>" ; } getCookie ( java . lang . String ) { if ( cookie == null ) { return "null" ; } return cookie ; }
org . junit . Assert . assertEquals ( "null" , rtn )
testReadyWithLocalTransactionWithFailure ( ) { akka . actor . ActorRef shardActorRef = getSystem ( ) . actorOf ( akka . actor . Props . create ( org . opendaylight . controller . cluster . raft . utils . DoNothingActor . class ) ) ; doReturn ( getSystem ( ) . actorSelection ( shardActorRef . path ( ) ) ) . when ( mockActorContext ) . actorSelection ( shardActorRef . path ( ) . toString ( ) ) ; org . opendaylight . yangtools . yang . data . api . schema . tree . DataTree mockDataTree = org . opendaylight . controller . cluster . datastore . TransactionProxyTest . createDataTree ( ) ; org . opendaylight . yangtools . yang . data . api . schema . tree . DataTreeModification mockModification = mockDataTree . takeSnapshot ( ) . newModification ( ) ; doThrow ( new java . lang . RuntimeException ( "mock" ) ) . when ( mockModification ) . ready ( ) ; doReturn ( akka . dispatch . Futures . successful ( newPrimaryShardInfo ( shardActorRef , mockDataTree ) ) ) . when ( mockActorContext ) . findPrimaryShardAsync ( eq ( DefaultShardStrategy . DEFAULT_SHARD ) ) ; org . opendaylight . controller . cluster . datastore . TransactionProxy transactionProxy = new org . opendaylight . controller . cluster . datastore . TransactionProxy ( mockComponentFactory , org . opendaylight . controller . cluster . datastore . TransactionType . WRITE_ONLY ) ; expectReadyLocalTransaction ( shardActorRef , true ) ; org . opendaylight . yangtools . yang . data . api . schema . NormalizedNode < ? , ? > nodeToWrite = org . opendaylight . yangtools . yang . data . impl . schema . ImmutableNodes . containerNode ( TestModel . TEST_QNAME ) ; transactionProxy . write ( TestModel . TEST_PATH , nodeToWrite ) ; org . opendaylight . mdsal . dom . spi . store . DOMStoreThreePhaseCommitCohort ready = transactionProxy . ready ( ) ; "<AssertPlaceHolder>" ; verifyCohortFutures ( ( ( org . opendaylight . controller . cluster . datastore . SingleCommitCohortProxy ) ( ready ) ) , org . opendaylight . controller . cluster . datastore . RuntimeException . class ) ; } ready ( ) { @ org . opendaylight . controller . sal . core . spi . data . SuppressWarnings ( "unchecked" ) final org . opendaylight . controller . sal . core . spi . data . SnapshotBackedWriteTransaction . TransactionReadyPrototype < T > wasReady = org . opendaylight . controller . sal . core . spi . data . SnapshotBackedWriteTransaction . READY_UPDATER . getAndSet ( this , null ) ; checkState ( ( wasReady != null ) , "Transaction<sp>%s<sp>is<sp>no<sp>longer<sp>open" , org . opendaylight . controller . sal . core . spi . data . SnapshotBackedWriteTransaction . getIdentifier ( ) ) ; org . opendaylight . controller . sal . core . spi . data . SnapshotBackedWriteTransaction . LOG . debug ( "Store<sp>transaction:<sp>{}<sp>:<sp>Ready" , org . opendaylight . controller . sal . core . spi . data . SnapshotBackedWriteTransaction . getIdentifier ( ) ) ; final org . opendaylight . yangtools . yang . data . api . schema . tree . DataTreeModification tree = mutableTree ; org . opendaylight . controller . sal . core . spi . data . SnapshotBackedWriteTransaction . TREE_UPDATER . lazySet ( this , null ) ; try { tree . ready ( ) ; return wasReady . transactionReady ( this , tree , null ) ; } catch ( java . lang . RuntimeException e ) { org . opendaylight . controller . sal . core . spi . data . SnapshotBackedWriteTransaction . LOG . debug ( "Store<sp>transaction:<sp>{}:<sp>unexpected<sp>failure<sp>when<sp>readying" , org . opendaylight . controller . sal . core . spi . data . SnapshotBackedWriteTransaction . getIdentifier ( ) , e ) ; return wasReady . transactionReady ( this , tree , e ) ; } }
org . junit . Assert . assertTrue ( ( ready instanceof org . opendaylight . controller . cluster . datastore . SingleCommitCohortProxy ) )
getStatus ( ) { org . infinispan . lifecycle . ComponentStatus expected = org . infinispan . lifecycle . ComponentStatus . INITIALIZING ; when ( this . manager . getStatus ( ) ) . thenReturn ( expected ) ; org . infinispan . lifecycle . ComponentStatus result = this . subject . getStatus ( ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { org . infinispan . lifecycle . ComponentStatus expected = org . infinispan . lifecycle . ComponentStatus . INITIALIZING ; when ( this . manager . getStatus ( ) ) . thenReturn ( expected ) ; org . infinispan . lifecycle . ComponentStatus result = this . subject . getStatus ( ) ; org . junit . Assert . assertSame ( expected , result ) ; }
org . junit . Assert . assertSame ( expected , result )
test_isTextSelectedInBlockSelectionForLingleEmptyLine ( ) { text . setText ( java . lang . System . getProperty ( "line.separator" ) ) ; text . setSize ( 100 , 100 ) ; text . setBlockSelection ( true ) ; text . setBlockSelectionBounds ( 0 , 0 , 100 , 100 ) ; "<AssertPlaceHolder>" ; } isTextSelected ( ) { checkWidget ( ) ; if ( ( blockSelection ) && ( ( blockXLocation ) != ( - 1 ) ) ) { org . eclipse . swt . custom . Rectangle rect = getBlockSelectionPosition ( ) ; return ! ( rect . isEmpty ( ) ) ; } return ( selection . y ) != ( selection . x ) ; }
org . junit . Assert . assertTrue ( text . isTextSelected ( ) )
leftJoin ( ) { java . sql . Connection conn = watcher . getOrCreateConnection ( ) ; new com . splicemachine . test_tools . TableCreator ( conn ) . withCreate ( "create<sp>table<sp>t1<sp>(c1<sp>int,<sp>c2<sp>int,<sp>primary<sp>key(c1))" ) . withInsert ( "insert<sp>into<sp>t1<sp>values(?,?)" ) . withRows ( rows ( row ( 1 , 10 ) , row ( 2 , 20 ) , row ( 3 , 30 ) , row ( 4 , 40 ) , row ( 5 , 50 ) , row ( 6 , 60 ) ) ) . create ( ) ; new com . splicemachine . test_tools . TableCreator ( conn ) . withCreate ( "create<sp>table<sp>t2<sp>(c1<sp>int,<sp>c2<sp>int,<sp>primary<sp>key(c1))" ) . withInsert ( "insert<sp>into<sp>t2<sp>values(?,?)" ) . withRows ( rows ( row ( 1 , 10 ) , row ( 3 , 30 ) , row ( 5 , 50 ) , row ( 6 , 60 ) ) ) . create ( ) ; java . lang . String JOIN_SQL = "--------------------\n" 0 + ( "--------------------\n" 5 + "on<sp>t1.c1<sp>=<sp>t2.c1" ) ; java . sql . ResultSet rs = conn . createStatement ( ) . executeQuery ( JOIN_SQL ) ; java . lang . String EXPECTED = "" + ( ( ( ( ( ( ( "--------------------\n" 3 + "--------------------\n" ) + "--------------------\n" 2 ) + "<sp>2<sp>|20<sp>|NULL<sp>|NULL<sp>|\n" ) + "<sp>3<sp>|30<sp>|<sp>3<sp>|<sp>30<sp>|\n" ) + "--------------------\n" 4 ) + "<sp>5<sp>|50<sp>|<sp>5<sp>|<sp>50<sp>|\n" ) + "--------------------\n" 1 ) ; "<AssertPlaceHolder>" ; } 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 ) )
Select_with_QueryTime ( ) { com . mysema . rdfbean . model . SPARQLQuery query = connection . createQuery ( QueryLanguage . SPARQL , com . mysema . rdfbean . virtuoso . SPARQLQueryTest . SELECT_LIMIT_10 ) ; query . setMaxQueryTime ( 1 ) ; com . mysema . commons . lang . CloseableIterator < java . util . Map < java . lang . String , com . mysema . rdfbean . model . NODE > > rows = query . getTuples ( ) ; "<AssertPlaceHolder>" ; while ( rows . hasNext ( ) ) { rows . next ( ) ; } rows . close ( ) ; } hasNext ( ) { try { return statements . hasNext ( ) ; } catch ( com . mysema . rdfbean . sesame . org . openrdf e ) { throw new com . mysema . rdfbean . model . RepositoryException ( e ) ; } }
org . junit . Assert . assertTrue ( rows . hasNext ( ) )
basicInstantiation ( ) { final org . apache . shiro . guice . ShiroModuleTest . MockRealm mockRealm = createMock ( org . apache . shiro . guice . ShiroModuleTest . MockRealm . class ) ; com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( new org . apache . shiro . guice . ShiroModule ( ) { @ org . apache . shiro . guice . Override protected void configureShiro ( ) { bindRealm ( ) . to ( org . apache . shiro . guice . ShiroModuleTest . MockRealm . class ) ; } @ com . google . inject . Provides public org . apache . shiro . guice . ShiroModuleTest . MockRealm createRealm ( ) { return mockRealm ; } } ) ; org . apache . shiro . mgt . SecurityManager securityManager = injector . getInstance ( org . apache . shiro . mgt . SecurityManager . class ) ; "<AssertPlaceHolder>" ; } getInstance ( java . lang . String ) { if ( in == null ) { return null ; } org . apache . shiro . crypto . hash . format . HashFormat hashFormat = null ; java . lang . Class clazz = null ; if ( in . startsWith ( ModularCryptFormat . TOKEN_DELIMITER ) ) { java . lang . String test = in . substring ( ModularCryptFormat . TOKEN_DELIMITER . length ( ) ) ; java . lang . String [ ] tokens = test . split ( ( "\\" + ( ModularCryptFormat . TOKEN_DELIMITER ) ) ) ; java . lang . String possibleMcfId = ( ( tokens != null ) && ( ( tokens . length ) > 0 ) ) ? tokens [ 0 ] : null ; if ( possibleMcfId != null ) { clazz = getHashFormatClass ( possibleMcfId ) ; } } if ( clazz == null ) { clazz = getHashFormatClass ( in ) ; } if ( clazz != null ) { hashFormat = newHashFormatInstance ( clazz ) ; } return hashFormat ; }
org . junit . Assert . assertNotNull ( securityManager )
testOverSizedBitImageImgFactory ( ) { final net . imglib2 . img . array . ArrayImgFactory < net . imglib2 . type . logic . BitType > factory = new net . imglib2 . img . array . ArrayImgFactory ( new net . imglib2 . type . logic . BitType ( ) ) ; final int numLongs = ( 1000 * 1000 ) / 64 ; final net . imglib2 . img . array . ArrayImg < net . imglib2 . type . logic . BitType , ? > img = factory . create ( 1000 , 1000 ) ; final java . util . Random r = new java . util . Random ( 42L ) ; img . forEach ( ( p ) -> { p . set ( r . nextBoolean ( ) ) ; } ) ; final long [ ] storage = ( ( long [ ] ) ( ( ( net . imglib2 . img . basictypeaccess . array . ArrayDataAccess < ? > ) ( img . update ( null ) ) ) . getCurrentStorageArray ( ) ) ) ; final long [ ] sizes = new long [ img . numDimensions ( ) ] ; img . dimensions ( sizes ) ; "<AssertPlaceHolder>" ; } dimensions ( long [ ] ) { for ( int d = 0 ; d < ( dims . length ) ; ++ d ) dims [ d ] = this . dimensions [ d ] ; }
org . junit . Assert . assertEquals ( numLongs , storage . length )
testUpdate ( ) { java . util . List < com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . StringAttributeClass > objs = new java . util . ArrayList < com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . StringAttributeClass > ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . StringAttributeClass obj = getUniqueObject ( ) ; objs . add ( obj ) ; } com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapper util = new com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapper ( dynamo ) ; for ( com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . StringAttributeClass obj : objs ) { util . save ( obj ) ; } for ( com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . StringAttributeClass obj : objs ) { com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . StringAttributeClass replacement = getUniqueObject ( ) ; replacement . setKey ( obj . getKey ( ) ) ; util . save ( replacement ) ; "<AssertPlaceHolder>" ; } } load ( T , com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapperConfig ) { @ com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . SuppressWarnings ( "unchecked" ) final java . lang . Class < T > clazz = ( ( java . lang . Class < T > ) ( keyObject . getClass ( ) ) ) ; config = mergeConfig ( config ) ; final com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . ItemConverter converter = getConverter ( config ) ; final java . lang . String tableName = getTableName ( clazz , keyObject , config ) ; final com . amazonaws . services . dynamodbv2 . model . GetItemRequest rq = new com . amazonaws . services . dynamodbv2 . model . GetItemRequest ( ) . withRequestMetricCollector ( config . getRequestMetricCollector ( ) ) ; final java . util . Map < java . lang . String , com . amazonaws . services . dynamodbv2 . model . AttributeValue > key = getKey ( converter , keyObject , clazz ) ; rq . setKey ( key ) ; rq . setTableName ( tableName ) ; rq . setConsistentRead ( ( ( config . getConsistentReads ( ) ) == ( com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapperConfig . ConsistentReads . CONSISTENT ) ) ) ; final com . amazonaws . services . dynamodbv2 . model . GetItemResult item = db . getItem ( com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapper . applyUserAgent ( rq ) ) ; final java . util . Map < java . lang . String , com . amazonaws . services . dynamodbv2 . model . AttributeValue > itemAttributes = item . getItem ( ) ; if ( itemAttributes == null ) { return null ; } final T object = privateMarshallIntoObject ( converter , toParameters ( itemAttributes , clazz , tableName , config ) ) ; return object ; }
org . junit . Assert . assertEquals ( replacement , util . load ( com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . StringAttributeClass . class , obj . getKey ( ) ) )
R1374_GeenGregoriaanseCorrecteDatum_MaarWelToegestaan ( ) { vulAdresElementMetGeldigeBAG ( ) ; params . datumAanvangAdreshouding = new nl . bzk . brp . bijhouding . bericht . model . DatumElement ( 12345678 ) ; adresElement = builder . maakAdres ( "com_adres" , params ) ; final java . util . List < nl . bzk . brp . bijhouding . bericht . model . MeldingElement > meldingen = adresElement . valideerInhoud ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )
test_parse_emptydate_haserror ( ) { java . lang . String formatString = "yyyy-MM-dd<sp>HH:mm:ss" ; java . lang . String dateString = "" ; "<AssertPlaceHolder>" ; } parse ( java . lang . String , java . lang . String ) { try { java . text . SimpleDateFormat sdf = new java . text . SimpleDateFormat ( format ) ; sdf . setLenient ( false ) ; java . util . Date date = sdf . parse ( dateString ) ; return date ; } catch ( java . lang . Exception e ) { org . restfulwhois . rdap . common . util . DateUtil . LOGGER . error ( "error<sp>timestamp<sp>format,error:{}" , e ) ; return null ; } }
org . junit . Assert . assertEquals ( null , org . restfulwhois . rdap . common . util . DateUtil . parse ( dateString , formatString ) )
testGetHeaderText_Initial ( ) { "<AssertPlaceHolder>" ; } getText ( ) { checkWidget ( ) ; return getText ( 0 ) ; }
org . junit . Assert . assertEquals ( "" , column . getText ( ) )
testValidateStorageUnitS3FilesRegisteredFileNoExists ( ) { org . finra . herd . model . api . xml . StorageUnit storageUnit = createStorageUnit ( org . finra . herd . service . helper . TEST_S3_KEY_PREFIX , org . finra . herd . service . helper . LOCAL_FILES , org . finra . herd . service . helper . FILE_SIZE_1_KB ) ; java . util . List < java . lang . String > actualS3Files = new java . util . ArrayList ( ) ; try { storageFileHelper . validateStorageUnitS3Files ( storageUnit , actualS3Files , org . finra . herd . service . helper . TEST_S3_KEY_PREFIX ) ; org . junit . Assert . fail ( "Should<sp>throw<sp>a<sp>RuntimeException<sp>when<sp>actual<sp>S3<sp>files<sp>do<sp>not<sp>exist." ) ; } catch ( java . lang . RuntimeException e ) { java . lang . String expectedErrMsg = java . lang . String . format ( "Registered<sp>file<sp>\"%s\"<sp>does<sp>not<sp>exist<sp>in<sp>\"%s\"<sp>storage." , storageUnit . getStorageFiles ( ) . get ( 0 ) . getFilePath ( ) , storageUnit . getStorage ( ) . getName ( ) ) ; "<AssertPlaceHolder>" ; } } getName ( ) { return this . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedErrMsg , e . getMessage ( ) )
testIntersection ( ) { java . lang . String query = "ApplicationService.(services[@name=~\"srp-app.*\"]<sp>&&<sp>updateStrategies[@name=\"1-100-novalid\"])" ; com . ebay . cloud . cms . query . service . IQueryResult result = queryService . query ( query , raptorContext ) ; "<AssertPlaceHolder>" ; } getEntities ( ) { return entities ; }
org . junit . Assert . assertEquals ( 0 , result . getEntities ( ) . size ( ) )
shouldNotCreateConnectionProfileWithEmptyName ( ) { when ( connectionProfileFactory . createConnectionProfile ( org . teiid . designer . runtime . connection . ConnectionInfoHelperTest . CP_NAME_VALUE , org . teiid . designer . runtime . connection . ConnectionInfoHelperTest . CP_DESC_VALUE , org . teiid . designer . runtime . connection . ConnectionInfoHelperTest . CP_PROVIDER_ID_VALUE , connectionProps ) ) . thenReturn ( connectionProfile ) ; org . eclipse . datatools . connectivity . IConnectionProfile profile = helper . createConnectionProfile ( org . teiid . designer . runtime . connection . ConnectionInfoHelperTest . EMPTY_STRING , org . teiid . designer . runtime . connection . ConnectionInfoHelperTest . CP_DESC_VALUE , org . teiid . designer . runtime . connection . ConnectionInfoHelperTest . CP_PROVIDER_ID_VALUE , connectionProps ) ; "<AssertPlaceHolder>" ; } createConnectionProfile ( java . lang . String , java . lang . String , java . lang . String , java . util . Properties ) { if ( ( this . connectionProfileFactory ) == null ) { this . connectionProfileFactory = new org . teiid . designer . datatools . connection . ConnectionProfileFactory ( ) ; } return this . connectionProfileFactory . createConnectionProfile ( name , description , id , props ) ; }
org . junit . Assert . assertNull ( profile )
equals_null ( ) { final net . sf . qualitycheck . immutableobject . domain . GenericDeclaration a = net . sf . qualitycheck . immutableobject . domain . GenericDeclaration . of ( "?<sp>extends<sp>List<String>" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } final net . sf . qualitycheck . ConditionalCheckTest . NotEqual other = ( ( net . sf . qualitycheck . ConditionalCheckTest . NotEqual ) ( obj ) ) ; if ( ( value ) != ( other . value ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( a . equals ( null ) )
javaCanComparePrintableAndPlainStrings ( ) { javax . security . auth . x500 . X500Principal principal1 = new javax . security . auth . x500 . X500Principal ( dnPrintable ) ; javax . security . auth . x500 . X500Principal principal2 = new javax . security . auth . x500 . X500Principal ( dnPlain ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( principal1 . equals ( principal2 ) )
testKeyBuildingFromRowText ( ) { org . apache . accumulo . core . data . Key keyBuilt = org . apache . accumulo . core . data . Key . builder ( ) . row ( rowText ) . build ( ) ; org . apache . accumulo . core . data . Key keyExpected = new org . apache . accumulo . core . data . Key ( rowText ) ; "<AssertPlaceHolder>" ; } build ( ) { return builderFunction . apply ( this ) ; }
org . junit . Assert . assertEquals ( keyExpected , keyBuilt )
testReduceDriverImmutableEmpty ( ) { try { org . apache . flink . runtime . operators . drivers . TestTaskContext < org . apache . flink . api . common . functions . ReduceFunction < org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > , org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > context = new org . apache . flink . runtime . operators . drivers . TestTaskContext < org . apache . flink . api . common . functions . ReduceFunction < org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > , org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > ( ) ; java . util . List < org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > data = org . apache . flink . runtime . operators . drivers . DriverTestData . createReduceImmutableData ( ) ; org . apache . flink . api . java . typeutils . TupleTypeInfo < org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > typeInfo = ( ( org . apache . flink . api . java . typeutils . TupleTypeInfo < org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > ) ( org . apache . flink . api . java . typeutils . TypeExtractor . getForObject ( data . get ( 0 ) ) ) ) ; org . apache . flink . util . MutableObjectIterator < org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > input = org . apache . flink . runtime . util . EmptyMutableObjectIterator . get ( ) ; context . setDriverStrategy ( DriverStrategy . SORTED_REDUCE ) ; org . apache . flink . api . common . typeutils . TypeComparator < org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > comparator = typeInfo . createComparator ( new int [ ] { 0 } , new boolean [ ] { true } , 0 , new org . apache . flink . api . common . ExecutionConfig ( ) ) ; org . apache . flink . runtime . operators . drivers . GatheringCollector < org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > result = new org . apache . flink . runtime . operators . drivers . GatheringCollector < org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > ( typeInfo . createSerializer ( new org . apache . flink . api . common . ExecutionConfig ( ) ) ) ; context . setInput1 ( input , typeInfo . createSerializer ( new org . apache . flink . api . common . ExecutionConfig ( ) ) ) ; context . setComparator1 ( comparator ) ; context . setCollector ( result ) ; org . apache . flink . runtime . operators . ReduceDriver < org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > driver = new org . apache . flink . runtime . operators . ReduceDriver < org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > > ( ) ; driver . setup ( context ) ; driver . prepare ( ) ; driver . run ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { System . err . println ( e . getMessage ( ) ) ; e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } } getList ( ) { return list ; }
org . junit . Assert . assertEquals ( 0 , result . getList ( ) . size ( ) )
upgradeEventNoRefCntError ( ) { frameInboundWriter . writeInboundHeaders ( Http2CodecUtil . HTTP_UPGRADE_STREAM_ID , request , 31 , false ) ; java . lang . reflect . Constructor < io . netty . handler . codec . http . HttpServerUpgradeHandler . UpgradeEvent > constructor = io . netty . handler . codec . http . HttpServerUpgradeHandler . UpgradeEvent . class . getDeclaredConstructor ( io . netty . handler . codec . http2 . CharSequence . class , io . netty . handler . codec . http . FullHttpRequest . class ) ; org . junit . Assume . assumeTrue ( ( ( io . netty . util . internal . ReflectionUtil . trySetAccessible ( constructor , true ) ) == null ) ) ; io . netty . handler . codec . http . HttpServerUpgradeHandler . UpgradeEvent upgradeEvent = constructor . newInstance ( "HTTP/2" , new io . netty . handler . codec . http . DefaultFullHttpRequest ( io . netty . handler . codec . http . HttpVersion . HTTP_1_1 , io . netty . handler . codec . http . HttpMethod . GET , "/" ) ) ; channel . pipeline ( ) . fireUserEventTriggered ( upgradeEvent ) ; "<AssertPlaceHolder>" ; } refCnt ( ) { return buf . refCnt ( ) ; }
org . junit . Assert . assertEquals ( 1 , upgradeEvent . refCnt ( ) )
shouldSetUser ( ) { this . connectionInfo . setUsername ( org . teiid . designer . runtime . TeiidConnectionInfoTest . NEW_USER ) ; "<AssertPlaceHolder>" ; } getUsername ( ) { return username ; }
org . junit . Assert . assertThat ( this . connectionInfo . getUsername ( ) , org . hamcrest . core . Is . is ( org . teiid . designer . runtime . TeiidConnectionInfoTest . NEW_USER ) )
testSetActiveModel02 ( ) { org . dresdenocl . model . IModelRegistry modelRegistry ; modelRegistry = org . dresdenocl . modelbus . ModelBusPlugin . getModelRegistry ( ) ; "<AssertPlaceHolder>" ; org . dresdenocl . model . IModel model ; model = org . dresdenocl . modelbus . test . ModelBusTestUtility . getUML2Model ( "resources/models/model01.uml" ) ; modelRegistry . setActiveModel ( model ) ; } getModels ( ) { org . dresdenocl . model . IModel [ ] result ; if ( ( this . models ) == null ) { result = new org . dresdenocl . model . IModel [ ] { } ; } else { result = this . models . toArray ( new org . dresdenocl . model . IModel [ this . models . size ( ) ] ) ; } return result ; }
org . junit . Assert . assertEquals ( 0 , modelRegistry . getModels ( ) . length )
testInsertStringId_Preset ( ) { com . jmethods . catatumbo . entities . StringId entity = new com . jmethods . catatumbo . entities . StringId ( ) ; java . lang . String id = "greeting1" ; entity . setId ( id ) ; entity . setGreetings ( "Good<sp>Morning!" ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( id , entity . getId ( ) )
mergeWithNull ( ) { puck . thrifty . datatype . ListElement elem = new puck . thrifty . datatype . ListElement ( new puck . thrifty . datatype . StringElement ( "test" ) ) ; puck . thrifty . datatype . Element mergeElem = elem . merge ( null ) ; "<AssertPlaceHolder>" ; } merge ( puck . thrifty . datatype . Element ) { if ( ( ( ( element == null ) || ( ( this ) == element ) ) || ( element . isUnknown ( ) ) ) || ( this . getClass ( ) . equals ( element . getClass ( ) ) ) ) { return this ; } else if ( element instanceof puck . thrifty . datatype . NumberElement ) { return element ; } throw new puck . thrifty . MergerException ( this , element ) ; }
org . junit . Assert . assertSame ( elem , mergeElem )
createDynamicModule ( ) { com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . asm . ASMClasspathScanner . class , de . devsurf . injection . guice . scanner . PackageFilter . create ( de . devsurf . injection . guice . scanner . asm . tests . autobind . names . NamedAutobindTests . class ) ) ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Class ) { return new de . devsurf . injection . guice . scanner . PackageFilter ( clazz . getPackage ( ) . getName ( ) , true ) ; }
org . junit . Assert . assertNotNull ( injector )
eventShouldBeFetchedForMultipleRelationsAndTimeInstant ( ) { com . graphaware . module . timetree . domain . TimeInstant timeInstant = com . graphaware . module . timetree . domain . TimeInstant . now ( ) ; org . neo4j . graphdb . Node event1 ; org . neo4j . graphdb . Node event2 ; try ( org . neo4j . graphdb . Transaction tx = getDatabase ( ) . beginTx ( ) ) { event1 = getDatabase ( ) . createNode ( ) ; event1 . setProperty ( "name" , "eventA" ) ; event2 = getDatabase ( ) . createNode ( ) ; event2 . setProperty ( "name" , "eventB" ) ; tx . success ( ) ; } try ( org . neo4j . graphdb . Transaction tx = getDatabase ( ) . beginTx ( ) ) { timedEvents . attachEvent ( event1 , com . graphaware . module . timetree . TimeTreeBackedEventsTest . AT_TIME , timeInstant ) ; timedEvents . attachEvent ( event2 , com . graphaware . module . timetree . TimeTreeBackedEventsTest . AT_OTHER_TIME , timeInstant ) ; tx . success ( ) ; } try ( org . neo4j . graphdb . Transaction tx = getDatabase ( ) . beginTx ( ) ) { com . graphaware . module . timetree . Set < org . neo4j . graphdb . RelationshipType > relationships = new com . graphaware . module . timetree . HashSet ( ) ; relationships . add ( com . graphaware . module . timetree . TimeTreeBackedEventsTest . AT_TIME ) ; relationships . add ( com . graphaware . module . timetree . TimeTreeBackedEventsTest . AT_OTHER_TIME ) ; com . graphaware . module . timetree . List < com . graphaware . module . timetree . domain . Event > events = timedEvents . getEvents ( timeInstant , relationships ) ; "<AssertPlaceHolder>" ; } } getEvents ( com . graphaware . module . timetree . domain . TimeInstant , com . graphaware . module . timetree . Set ) { return getEvents ( timeInstant , types , com . graphaware . module . timetree . INCOMING ) ; }
org . junit . Assert . assertEquals ( 2 , events . size ( ) )
testSerialization ( ) { org . jfree . chart . renderer . xy . XYStepRenderer r1 = new org . jfree . chart . renderer . xy . XYStepRenderer ( ) ; r1 . setStepPoint ( 0.123 ) ; org . jfree . chart . renderer . xy . XYStepRenderer r2 = ( ( org . jfree . chart . renderer . xy . XYStepRenderer ) ( org . jfree . chart . TestUtils . serialised ( r1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( r1 , r2 )
testCleansedRowResultsValidationCountsV1 ( ) { com . thinkbiganalytics . spark . datavalidator . CleansedRowResult cleansedRowResult1 = new com . thinkbiganalytics . spark . datavalidator . CleansedRowResult ( org . mockito . Mockito . mock ( org . apache . spark . sql . Row . class ) , new boolean [ ] { true , true , true , true , true } , true ) ; com . thinkbiganalytics . spark . datavalidator . CleansedRowResult cleansedRowResult2 = new com . thinkbiganalytics . spark . datavalidator . CleansedRowResult ( org . mockito . Mockito . mock ( org . apache . spark . sql . Row . class ) , new boolean [ ] { true , false , true , true , false } , false ) ; com . thinkbiganalytics . spark . datavalidator . CleansedRowResult cleansedRowResult3 = new com . thinkbiganalytics . spark . datavalidator . CleansedRowResult ( org . mockito . Mockito . mock ( org . apache . spark . sql . Row . class ) , new boolean [ ] { false , false , true , true , false } , false ) ; java . util . List < com . thinkbiganalytics . spark . datavalidator . CleansedRowResult > cleansedRowResultsList = java . util . Arrays . asList ( cleansedRowResult1 , cleansedRowResult1 , cleansedRowResult1 , cleansedRowResult1 , cleansedRowResult1 , cleansedRowResult1 , cleansedRowResult1 , cleansedRowResult2 , cleansedRowResult3 ) ; org . apache . spark . SparkConf conf = new org . apache . spark . SparkConf ( ) ; conf . setMaster ( "local[*]" ) ; conf . setAppName ( "Validator<sp>Test<sp>-<sp>Spark<sp>1" ) ; org . apache . spark . api . java . JavaSparkContext sc = new org . apache . spark . api . java . JavaSparkContext ( conf ) ; org . apache . spark . api . java . JavaRDD < com . thinkbiganalytics . spark . datavalidator . CleansedRowResult > inputRDD = sc . parallelize ( cleansedRowResultsList , 4 ) ; com . thinkbiganalytics . spark . datavalidator . StandardDataValidator validator = new com . thinkbiganalytics . spark . datavalidator . StandardDataValidator ( new com . thinkbiganalytics . spark . datavalidator . ValidatorStrategyV1 ( ) , org . mockito . Mockito . mock ( com . thinkbiganalytics . spark . SparkContextService . class ) ) ; long [ ] output = validator . cleansedRowResultsValidationCounts ( inputRDD , 5 ) ; long [ ] expectedOutput = new long [ ] { 1L , 2L , 0L , 0L , 2L , 7L , 2L } ; "<AssertPlaceHolder>" ; sc . close ( ) ; } cleansedRowResultsValidationCounts ( org . apache . spark . api . java . JavaRDD , int ) { org . apache . spark . api . java . JavaRDD < long [ ] > partitionCounts = validatorStrategy . getCleansedRowResultPartitionCounts ( cleansedRowResultJavaRDD , schemaLength ) ; if ( cleansedRowResultJavaRDD . isEmpty ( ) ) { long [ ] counts = new long [ schemaLength + 2 ] ; java . util . Arrays . fill ( counts , 0 ) ; return counts ; } return partitionCounts . reduce ( new com . thinkbiganalytics . spark . datavalidator . functions . SumPartitionLevelCounts ( ) ) ; }
org . junit . Assert . assertArrayEquals ( expectedOutput , output )
test_invalid_handle_exceed_maxlength ( ) { org . restfulwhois . rdap . common . dto . DomainDto domain = generateDomainDto ( ) ; java . lang . String stringExceedOneMoreChar = createStringWithLength ( ( ( org . restfulwhois . rdap . common . util . UpdateValidateUtil . MAX_LENGTH_HANDLE ) + 1 ) ) ; domain . setHandle ( stringExceedOneMoreChar ) ; "<AssertPlaceHolder>" ; java . lang . String content = org . restfulwhois . rdap . JsonHelper . serialize ( domain ) ; mockMvc . perform ( post ( org . restfulwhois . rdap . controller . DomainCreateControllerTest . URI_DOMAIN_U ) . contentType ( org . springframework . http . MediaType . parseMediaType ( rdapJson ) ) . content ( content ) ) . andExpect ( status ( ) . isBadRequest ( ) ) . andExpect ( content ( ) . contentType ( rdapJson ) ) . andExpect ( jsonPath ( "$.errorCode" ) . value ( 400 ) ) . andExpect ( jsonPath ( "$.subErrorCode" ) . value ( 4003 ) ) . andExpect ( jsonPath ( "$.description" ) . value ( org . hamcrest . CoreMatchers . hasItems ( java . lang . String . format ( ServiceErrorCode . ERROR_4003 . getMessage ( ) , "handle" , ( ( org . restfulwhois . rdap . common . util . UpdateValidateUtil . MAX_LENGTH_HANDLE ) + "" ) ) ) ) ) ; } getHandle ( ) { return handle ; }
org . junit . Assert . assertTrue ( ( ( domain . getHandle ( ) . length ( ) ) > ( org . restfulwhois . rdap . common . util . UpdateValidateUtil . MAX_LENGTH_HANDLE ) ) )
testBaseParser ( ) { java . io . File baseDir = new java . io . File ( aok . coc . util . TestImageParser . class . getResource ( "/full_base_images" ) . getFile ( ) ) ; int fail = 0 ; for ( java . io . File f : baseDir . listFiles ( ) ) { System . out . println ( ( "processing<sp>" + ( f . getName ( ) ) ) ) ; java . awt . image . BufferedImage src = javax . imageio . ImageIO . read ( f ) ; boolean isFullActual = aok . coc . util . ImageParser . isCollectorFullBase ( src ) ; boolean isFullExpected = f . getName ( ) . startsWith ( "true" ) ; try { "<AssertPlaceHolder>" ; } catch ( java . lang . AssertionError e ) { fail ++ ; System . out . println ( ( ( ( e . getMessage ( ) ) + "<sp>for<sp>" ) + ( f . getName ( ) ) ) ) ; } } System . out . println ( ( "Full<sp>Collector<sp>Base<sp>Success<sp>Rate:<sp>" + ( 1 - ( ( ( float ) ( fail ) ) / ( baseDir . listFiles ( ) . length ) ) ) ) ) ; } isCollectorFullBase ( java . awt . image . BufferedImage ) { aok . coc . util . FileSystem fileSystem = null ; java . util . stream . Stream < aok . coc . util . Path > walk = null ; try { java . net . URI uri = aok . coc . util . ImageParser . class . getResource ( "/elixir_images" ) . toURI ( ) ; aok . coc . util . Path images ; if ( uri . getScheme ( ) . equals ( "jar" ) ) { fileSystem = aok . coc . util . FileSystems . newFileSystem ( uri , aok . coc . util . Collections . emptyMap ( ) ) ; images = fileSystem . getPath ( "/elixir_images" ) ; } else { images = aok . coc . util . Paths . get ( uri ) ; } walk = aok . coc . util . Files . walk ( images , 1 ) ; java . util . List < aok . coc . util . Rectangle > matchedElixirs = new aok . coc . util . ArrayList ( ) ; int attackableElixirs = 0 ; for ( aok . coc . util . Iterator < aok . coc . util . Path > it = walk . iterator ( ) ; it . hasNext ( ) ; ) { aok . coc . util . Path next = it . next ( ) ; if ( ( ( aok . coc . util . Files . isDirectory ( next ) ) || ( aok . coc . util . Files . isHidden ( next ) ) ) || ( ! ( next . toString ( ) . endsWith ( ".png" ) ) ) ) { continue ; } java . awt . image . BufferedImage tar = javax . imageio . ImageIO . read ( aok . coc . util . Files . newInputStream ( next , StandardOpenOption . READ ) ) ; if ( tar == null ) { continue ; } java . util . List < org . sikuli . core . search . RegionMatch > doFindAll = org . sikuli . core . search . algorithm . TemplateMatcher . findMatchesByGrayscaleAtOriginalResolution ( image , tar , 7 , 0.8 ) ; int c = 0 ; RECT_LOOP : for ( org . sikuli . core . search . RegionMatch i : doFindAll ) { if ( ! ( aok . coc . util . ImageParser . ENEMY_BASE_POLY . contains ( i . x , i . y ) ) ) { continue ; } for ( aok . coc . util . Rectangle r : matchedElixirs ) { if ( r . intersects ( i . getBounds ( ) ) ) { break RECT_LOOP ; } } c ++ ; matchedElixirs . add ( i . getBounds ( ) ) ; if ( next . getFileName ( ) . toString ( ) . startsWith ( "empty" ) ) { attackableElixirs -- ; } else if ( next . getFileName ( ) . toString ( ) . startsWith ( "full" ) ) { attackableElixirs ++ ; } aok . coc . util . ImageParser . logger . finest ( ( ( ( "\t" + ( i . getBounds ( ) ) ) + "<sp>score:<sp>" ) + ( i . getScore ( ) ) ) ) ; } if ( c > 0 ) { aok . coc . util . ImageParser . logger . finest ( java . lang . String . format ( "\tfound<sp>%d<sp>elixirs<sp>matching<sp>%s\n" , c , next . getFileName ( ) . toString ( ) ) ) ; } } boolean result = attackableElixirs >= 0 ; if ( result == false ) { aok . coc . util . ImageParser . logger . info ( "empty<sp>collectors" ) ; } return result ; } catch ( java . lang . Exception e ) { throw new aok . coc . exception . BotException ( e . getMessage ( ) , e ) ; } finally { if ( fileSystem != null ) { try { fileSystem . close ( ) ; } catch ( java . io . IOException e ) { aok . coc . util . ImageParser . logger . log ( Level . SEVERE , e . getMessage ( ) , e ) ; } } if ( walk != null ) { walk . close ( ) ; } } }
org . junit . Assert . assertEquals ( isFullExpected , isFullActual )
deveObterVersaoAplicacaoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . inutilizacao . NFRetornoEventoInutilizacaoDados dados = new com . fincatto . documentofiscal . nfe310 . classes . evento . inutilizacao . NFRetornoEventoInutilizacaoDados ( ) ; final java . lang . String versaoAplicacao = "v10.0" ; dados . setVersaoAplicacao ( versaoAplicacao ) ; "<AssertPlaceHolder>" ; } getVersaoAplicacao ( ) { return this . versaoAplicacao ; }
org . junit . Assert . assertEquals ( versaoAplicacao , dados . getVersaoAplicacao ( ) )
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . marketplace . model . App . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . eq ( "appId" , com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ) ; java . util . List < com . liferay . marketplace . model . App > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
givenFolderNotFoundWhenCreateFolderThenReturnCreated ( ) { when ( fr . gouv . vitam . workspace . client . WorkspaceClientFolderTest . mock . post ( ) ) . thenReturn ( javax . ws . rs . core . Response . status ( Status . CREATED ) . build ( ) ) ; fr . gouv . vitam . workspace . client . WorkspaceClientFolderTest . client . createFolder ( fr . gouv . vitam . workspace . client . WorkspaceClientFolderTest . CONTAINER_NAME , fr . gouv . vitam . workspace . client . WorkspaceClientFolderTest . FOLDER_NAME ) ; "<AssertPlaceHolder>" ; } createFolder ( java . lang . String , java . lang . String ) { fr . gouv . vitam . common . ParametersChecker . checkParameter ( ErrorMessage . CONTAINER_FOLDER_NAMES_ARE_A_MANDATORY_PARAMETER . getMessage ( ) , containerName , folderName ) ; javax . ws . rs . core . Response response = null ; try { response = performRequest ( HttpMethod . POST , ( ( ( ( fr . gouv . vitam . workspace . client . WorkspaceClient . CONTAINERS ) + containerName ) + ( fr . gouv . vitam . workspace . client . WorkspaceClient . FOLDERS ) ) + folderName ) , null , MediaType . APPLICATION_JSON_TYPE ) ; if ( ( Status . CREATED . getStatusCode ( ) ) == ( response . getStatus ( ) ) ) { fr . gouv . vitam . workspace . client . WorkspaceClient . LOGGER . debug ( ( ( ( ( containerName + "/" ) + folderName ) + ":<sp>" ) + ( Response . Status . CREATED . getReasonPhrase ( ) ) ) ) ; } else if ( ( Status . CONFLICT . getStatusCode ( ) ) == ( response . getStatus ( ) ) ) { fr . gouv . vitam . workspace . client . WorkspaceClient . LOGGER . warn ( ErrorMessage . FOLDER_ALREADY_EXIST . getMessage ( ) ) ; throw new fr . gouv . vitam . workspace . api . exception . ContentAddressableStorageAlreadyExistException ( ErrorMessage . FOLDER_ALREADY_EXIST . getMessage ( ) ) ; } else { fr . gouv . vitam . workspace . client . WorkspaceClient . LOGGER . error ( response . getStatusInfo ( ) . getReasonPhrase ( ) ) ; throw new fr . gouv . vitam . workspace . api . exception . ContentAddressableStorageServerException ( ErrorMessage . INTERNAL_SERVER_ERROR . getMessage ( ) ) ; } } catch ( final fr . gouv . vitam . common . exception . VitamClientInternalException e ) { fr . gouv . vitam . workspace . client . WorkspaceClient . LOGGER . error ( fr . gouv . vitam . workspace . client . WorkspaceClient . INTERNAL_SERVER_ERROR2 , e ) ; throw new fr . gouv . vitam . workspace . api . exception . ContentAddressableStorageServerException ( e ) ; } finally { consumeAnyEntityAndClose ( response ) ; } }
org . junit . Assert . assertTrue ( true )
verifyStringValues ( ) { org . opennms . plugins . elasticsearch . rest . template . IndexSettings indexSettings = new org . opennms . plugins . elasticsearch . rest . template . IndexSettings ( ) ; indexSettings . setRoutingPartitionSize ( "" ) ; indexSettings . setRefreshInterval ( "" ) ; indexSettings . setNumberOfShards ( "" ) ; indexSettings . setNumberOfReplicas ( "" ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ( getConfigDef ( ) . getRanges ( ) . size ( ) ) < 1 ) && ( ( getConfigDef ( ) . getSpecifics ( ) . size ( ) ) < 1 ) ; }
org . junit . Assert . assertThat ( indexSettings . isEmpty ( ) , org . hamcrest . core . Is . is ( true ) )
jsonLiteralObjectKeysWithEscapedTabsAreAllowed ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = JsonLiteral ( "{\"hello\\tworld\":1}" ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "`{\"hello\\tworld\":1}`" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( str ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) )
testAcceptActueel ( ) { final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . transformeer . TransformatieDw002Actueel transformatieActueel = new nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . transformeer . TransformatieDw002Actueel ( ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . VerschilGroep verschilGroep = maakPersoonIDVerschilGroep ( VerschilType . RIJ_TOEGEVOEGD , true ) ; "<AssertPlaceHolder>" ; } accept ( java . io . File ) { return ( ( ( ( ( ( file . isFile ( ) ) && ( ! ( file . getName ( ) . toLowerCase ( ) . endsWith ( "properties" ) ) ) ) && ( ! ( file . getName ( ) . toLowerCase ( ) . endsWith ( "inject" ) ) ) ) && ( ! ( file . getName ( ) . toLowerCase ( ) . endsWith ( "extract" ) ) ) ) && ( ! ( file . getName ( ) . toLowerCase ( ) . endsWith ( "check" ) ) ) ) && ( ! ( file . getName ( ) . contains ( ".DS_Store" ) ) ) ) && ( ! ( file . getName ( ) . contains ( "sch.naTestCase" ) ) ) ; }
org . junit . Assert . assertTrue ( transformatieActueel . accept ( verschilGroep ) )
shouldIgnore ( ) { final gherkin . formatter . model . Tag tag = new gherkin . formatter . model . Tag ( "@IgNore" , 1 ) ; when ( scenario . getTags ( ) ) . thenReturn ( java . util . Arrays . asList ( tag ) ) ; final boolean result = uut . ignore ( ) ; "<AssertPlaceHolder>" ; } ignore ( ) { for ( final gherkin . formatter . model . Tag tag : tagStatement . getTags ( ) ) { if ( tag . getName ( ) . toLowerCase ( ) . equals ( com . github . bmsantos . core . cola . formatter . TagStatementDetails . IGNORE ) ) { return true ; } } return false ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) )
getPreferredName_shouldReturnTheBesLocalePreferred ( ) { org . openmrs . Concept testConcept = createConcept ( 1 , Locale . US ) ; org . openmrs . ConceptName preferredName = createConceptName ( 4 , "Doctor" , new java . util . Locale ( "en" ) , null , true ) ; testConcept . addName ( preferredName ) ; "<AssertPlaceHolder>" ; } getName ( ) { if ( getNames ( ) . isEmpty ( ) ) { if ( org . openmrs . Concept . log . isDebugEnabled ( ) ) { org . openmrs . Concept . log . debug ( ( "there<sp>are<sp>no<sp>names<sp>defined<sp>for:<sp>" + ( conceptId ) ) ) ; } return null ; } for ( java . util . Locale currentLocale : org . openmrs . util . LocaleUtility . getLocalesInOrder ( ) ) { org . openmrs . ConceptName preferredName = getPreferredName ( currentLocale ) ; if ( preferredName != null ) { return preferredName ; } org . openmrs . ConceptName fullySpecifiedName = getFullySpecifiedName ( currentLocale ) ; if ( fullySpecifiedName != null ) { return fullySpecifiedName ; } if ( ( ! ( org . apache . commons . lang3 . StringUtils . isBlank ( currentLocale . getCountry ( ) ) ) ) || ( ! ( org . apache . commons . lang3 . StringUtils . isBlank ( currentLocale . getVariant ( ) ) ) ) ) { java . util . Locale broaderLocale = new java . util . Locale ( currentLocale . getLanguage ( ) ) ; org . openmrs . ConceptName prefNameInBroaderLoc = getPreferredName ( broaderLocale ) ; if ( prefNameInBroaderLoc != null ) { return prefNameInBroaderLoc ; } org . openmrs . ConceptName fullySpecNameInBroaderLoc = getFullySpecifiedName ( broaderLocale ) ; if ( fullySpecNameInBroaderLoc != null ) { return fullySpecNameInBroaderLoc ; } } } for ( org . openmrs . ConceptName cn : getNames ( ) ) { if ( cn . isFullySpecifiedName ( ) ) { return cn ; } } if ( ! ( getSynonyms ( ) . isEmpty ( ) ) ) { return getSynonyms ( ) . iterator ( ) . next ( ) ; } return null ; }
org . junit . Assert . assertEquals ( preferredName . getName ( ) , testConcept . getPreferredName ( Locale . US ) . getName ( ) )
testSearchMaxItems ( ) { java . util . Collection < org . guvnor . common . services . project . model . WorkspaceProject > result = searchService . searchByName ( "item" , 1 , false ) ; "<AssertPlaceHolder>" ; } size ( ) { return fileAttrs . size ( ) ; }
org . junit . Assert . assertEquals ( result . size ( ) , 1 )
runTestArrayAccess1 ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "ArraysAndLists/ArrayAccess1.apk" ) ; if ( res != null ) "<AssertPlaceHolder>" ; } size ( ) { return ( this . results ) == null ? 0 : this . results . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , res . size ( ) )
testSecurityManager ( ) { final org . drools . compiler . builder . impl . KnowledgeBuilderImpl builder = new org . drools . compiler . builder . impl . KnowledgeBuilderImpl ( ) ; java . io . InputStream is = this . getClass ( ) . getResourceAsStream ( "/com/security/example.drl" ) ; builder . addPackageFromDrl ( new java . io . InputStreamReader ( is ) ) ; "<AssertPlaceHolder>" ; } getErrors ( ) { return errors ; }
org . junit . Assert . assertTrue ( ( ( builder . getErrors ( ) . getErrors ( ) . length ) == 0 ) )
testTruncDateValues_Default ( ) { java . lang . String sqlText = "values<sp>truncate(date('2011-12-26'))" ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . TruncateFunctionIT . spliceClassWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "1<sp>|\n" + ( "------------\n" + "2011-12-26<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 ) )
testOnConnectionChangedDelete_Upper ( ) { verify ( target , atLeastOnce ( ) ) . onConnectionChangedDelete ( message ) ; org . powermock . api . mockito . PowerMockito . verifyPrivate ( target ) . invoke ( "doOnConnectionChangedDeleteUpper" , "NetworkId" ) ; "<AssertPlaceHolder>" ; verify ( conversionTable ) . delEntryConnectionType ( "NetworkId" ) ; verify ( conversionTable ) . delEntryNetwork ( "NetworkId" ) ; org . mockito . InOrder inOrder = org . mockito . Mockito . inOrder ( curr , systemIf ) ; inOrder . verify ( curr ) . setConnectionState ( ComponentConnection . State . FINALIZING ) ; inOrder . verify ( systemIf ) . putConnection ( curr ) ; inOrder . verify ( curr ) . setConnectionState ( ComponentConnection . State . NONE ) ; inOrder . verify ( systemIf ) . putConnection ( curr ) ; } getObjectState ( ) { return property . get ( org . o3project . odenos . remoteobject . ObjectProperty . PropertyNames . OBJECT_STATE ) ; }
org . junit . Assert . assertThat ( curr . getObjectState ( ) , org . hamcrest . CoreMatchers . is ( ComponentConnection . State . NONE ) )
testSerialization ( ) { org . jfree . data . statistics . MeanAndStandardDeviation m1 = new org . jfree . data . statistics . MeanAndStandardDeviation ( 1.2 , 3.4 ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( m1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . data . statistics . MeanAndStandardDeviation m2 = ( ( org . jfree . data . statistics . MeanAndStandardDeviation ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertEquals ( m1 , m2 )
testGetLayersSync ( ) { try { java . util . HashMap < java . lang . String , java . lang . String [ ] > queryParams = new java . util . HashMap < java . lang . String , java . lang . String [ ] > ( ) ; java . lang . String jsonString = com . simplegeo . client . SimpleGeoStorageClientTest . client . getLayers ( queryParams ) ; com . simplegeo . client . types . LayerCollection layers = com . simplegeo . client . types . LayerCollection . fromJSONString ( jsonString ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } catch ( org . json . JSONException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } getLayers ( ) { return layers ; }
org . junit . Assert . assertNotNull ( layers . getLayers ( ) )
testGetUriWithFilterOneObjectId ( ) { org . bson . BsonObjectId id = new org . bson . BsonObjectId ( new org . bson . types . ObjectId ( ) ) ; org . restheart . handlers . RequestContext context = prepareRequestContext ( ) ; java . lang . String expResult = ( "/dbName/collName?filter={'referenceField':{'$oid':'" + ( id . getValue ( ) . toString ( ) ) ) + "'}}" ; java . lang . String result ; try { result = org . restheart . utils . URLUtils . getUriWithFilterOne ( context , "dbName" , "collName" , "referenceField" , id ) ; "<AssertPlaceHolder>" ; } catch ( org . restheart . hal . UnsupportedDocumentIdException ex ) { org . junit . Assert . fail ( ex . getMessage ( ) ) ; } } getUriWithFilterOne ( org . restheart . handlers . RequestContext , java . lang . String , java . lang . String , java . lang . String , org . bson . BsonValue ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "/" ) . append ( dbName ) . append ( "/" ) . append ( collName ) . append ( "a" 0 ) . append ( "filter={" ) . append ( "'" ) . append ( referenceField ) . append ( "'" ) . append ( ":" ) . append ( org . restheart . utils . URLUtils . getIdString ( id ) ) . append ( "}" ) ; return context . mapUri ( sb . toString ( ) ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testInvalidMaxResult ( ) { java . util . List < com . ebay . pulsar . analytics . datasource . PulsarRestMetricMeta > metricsList = new java . util . ArrayList < com . ebay . pulsar . analytics . datasource . PulsarRestMetricMeta > ( ) ; com . ebay . pulsar . analytics . datasource . PulsarRestMetricMeta meta = new com . ebay . pulsar . analytics . datasource . PulsarRestMetricMeta ( ) ; meta . setTableName ( "testtable" ) ; meta . setMetricName ( "testmetric" ) ; meta . setMetricEndpoints ( com . google . common . collect . Sets . newHashSet ( "core" ) ) ; metricsList . add ( meta ) ; com . ebay . pulsar . analytics . datasource . PulsarRestMetricRegistry pulsarRestMetricRegistry = new com . ebay . pulsar . analytics . datasource . PulsarRestMetricRegistry ( metricsList ) ; com . ebay . pulsar . analytics . holap . query . validator . PulsarRestValidator pulsarRestValidator = new com . ebay . pulsar . analytics . holap . query . validator . PulsarRestValidator ( pulsarRestMetricRegistry ) ; com . ebay . pulsar . analytics . query . request . CoreRequest coreRequest = new com . ebay . pulsar . analytics . query . request . CoreRequest ( ) ; coreRequest . setEndTime ( "2015-09-15<sp>23:59:59" ) ; coreRequest . setStartTime ( "2015-09-09<sp>00:00:00" ) ; coreRequest . setDimensions ( com . google . common . collect . Lists . newArrayList ( "testDim" ) ) ; coreRequest . setFilter ( "testFilter" ) ; coreRequest . setGranularity ( "testGranularity" ) ; coreRequest . setHaving ( "testHaving" ) ; coreRequest . setMaxResults ( 0 ) ; coreRequest . setMetrics ( com . google . common . collect . Lists . newArrayList ( "testmetric" ) ) ; coreRequest . setNamespace ( Constants . RequestNameSpace . core ) ; coreRequest . setSort ( "testSort" ) ; try { pulsarRestValidator . validate ( coreRequest ) ; org . junit . Assert . fail ( "testmetric" 0 ) ; } catch ( com . ebay . pulsar . analytics . exception . InvalidQueryParameterException ex ) { "<AssertPlaceHolder>" ; } } validate ( com . ebay . pulsar . analytics . query . request . BaseSQLRequest ) { if ( com . google . common . base . Strings . isNullOrEmpty ( req . getSql ( ) ) ) { throw new com . ebay . pulsar . analytics . exception . InvalidQueryParameterException ( ExceptionErrorCode . MISSING_SQL . getErrorMessage ( ) ) ; } com . ebay . pulsar . analytics . query . request . SQLRequest sqlReq = ( ( com . ebay . pulsar . analytics . query . request . SQLRequest ) ( req ) ) ; org . joda . time . DateTime start = null ; org . joda . time . DateTime end = null ; java . lang . String intervalStr = sqlReq . getIntervals ( ) ; java . lang . String customTime = sqlReq . getCustomTime ( ) ; java . lang . String startTime = sqlReq . getStartTime ( ) ; java . lang . String endTime = sqlReq . getEndTime ( ) ; if ( customTime != null ) { if ( ( ( startTime == null ) && ( endTime == null ) ) && ( intervalStr == null ) ) { if ( customTime . equals ( "today" ) ) { throw new com . ebay . pulsar . analytics . exception . InvalidQueryParameterException ( ( ( ExceptionErrorCode . INVALID_CUSTOM_TIME . getErrorMessage ( ) ) + customTime ) ) ; } else if ( customTime . equals ( "yesterday" ) ) { throw new com . ebay . pulsar . analytics . exception . InvalidQueryParameterException ( ( ( ExceptionErrorCode . INVALID_CUSTOM_TIME . getErrorMessage ( ) ) + customTime ) ) ; } } else { throw new com . ebay . pulsar . analytics . exception . InvalidQueryParameterException ( ExceptionErrorCode . INVALID_QUERYTIME . getErrorMessage ( ) ) ; } } else { if ( intervalStr != null ) { java . lang . String [ ] strArr = intervalStr . split ( "/" ) ; if ( ( strArr . length ) != 2 ) { throw new com . ebay . pulsar . analytics . exception . InvalidQueryParameterException ( ExceptionErrorCode . INVALID_QUERYTIME . getErrorMessage ( ) ) ; } else { startTime = strArr [ 0 ] ; endTime = strArr [ 1 ] ; } } try { start = PulsarDateTimeFormatter . INPUTTIME_FORMATTER . parseDateTime ( startTime ) ; end = PulsarDateTimeFormatter . INPUTTIME_FORMATTER . parseDateTime ( endTime ) ; } catch ( java . lang . Exception e ) { } if ( start == null ) throw new com . ebay . pulsar . analytics . exception . InvalidQueryParameterException ( ExceptionErrorCode . INVALID_QUERYTIME . getErrorMessage ( ) ) ; if ( end == null ) throw new com . ebay . pulsar . analytics . exception . InvalidQueryParameterException ( ExceptionErrorCode . INVALID_QUERYTIME . getErrorMessage ( ) ) ; if ( ( start . compareTo ( end ) ) >= 0 ) { throw new com . ebay . pulsar . analytics . exception . InvalidQueryParameterException ( ( ( ( ( ExceptionErrorCode . INVALID_QUERYTIME . getErrorMessage ( ) ) + start ) + "/" ) + end ) ) ; } org . joda . time . DateTime now = new org . joda . time . DateTime ( ) ; if ( ( start . compareTo ( now ) ) >= 0 ) { throw new com . ebay . pulsar . analytics . exception . InvalidQueryParameterException ( ( ( ExceptionErrorCode . INVALID_QUERYTIME . getErrorMessage ( ) ) + start ) ) ; } } }
org . junit . Assert . assertTrue ( true )
testNonEqualCharset ( ) { com . sap . core . odata . core . commons . ContentType t1 = com . sap . core . odata . core . commons . ContentType . create ( "aaa/bbb;charset=c1" ) ; com . sap . core . odata . core . commons . ContentType t2 = com . sap . core . odata . core . commons . ContentType . create ( "aaa/bbb;charset=c2" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } com . sap . core . odata . api . exception . MessageReference other = ( ( com . sap . core . odata . api . exception . MessageReference ) ( obj ) ) ; if ( ( key ) == null ) { if ( ( other . key ) != null ) { return false ; } } else if ( ! ( key . equals ( other . key ) ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( t1 . equals ( t2 ) )
filenameForUrl ( ) { java . net . URL url = new java . net . URL ( "https://avatars3.githubusercontent.com/u/8456476?v=3&s=460" ) ; final java . lang . String encoded = java . net . URLEncoder . encode ( url . toExternalForm ( ) , "UTF-8" ) ; java . nio . file . Path cacheDirectory = cache . getCacheDirectory ( ) ; final java . nio . file . Path filenamePath = cacheDirectory . resolve ( encoded ) ; "<AssertPlaceHolder>" ; } filenameForURL ( java . net . URL ) { if ( null == ( cacheDirectory ) ) { throw new java . lang . IllegalStateException ( "cannot<sp>resolve<sp>filename<sp>for<sp>url" ) ; } final java . lang . String mappedString = java . util . Objects . requireNonNull ( doMappings ( url . toExternalForm ( ) ) ) ; final java . lang . String encodedString = java . net . URLEncoder . encode ( mappedString , "UTF-8" ) ; return cacheDirectory . resolve ( encodedString ) ; }
org . junit . Assert . assertThat ( filenamePath , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( cache . filenameForURL ( url ) ) ) )
whenCreatedFromMapWithJavaLoggingLevel_hasSpecifiedValue ( ) { oracle . kubernetes . operator . helm . HelmOperatorValues values = new oracle . kubernetes . operator . helm . HelmOperatorValues ( com . google . common . collect . ImmutableMap . of ( "javaLoggingLevel" , stringValue ) ) ; "<AssertPlaceHolder>" ; } getJavaLoggingLevel ( ) { return javaLoggingLevel ; }
org . junit . Assert . assertThat ( values . getJavaLoggingLevel ( ) , org . hamcrest . Matchers . equalTo ( stringValue ) )
testGetVirtualSizeWhenVirtualSizeThrowsException ( ) { long virtualSize = 2000 ; long actualSize = 1000 ; java . lang . String templatePath = "/tmp" ; java . lang . String templateName = "template" ; java . io . File mockFile = org . mockito . Mockito . mock ( java . io . File . class ) ; org . mockito . Mockito . when ( mockFile . length ( ) ) . thenReturn ( actualSize ) ; org . mockito . Mockito . when ( mockFile . getParent ( ) ) . thenReturn ( templatePath ) ; org . mockito . Mockito . when ( mockFile . getName ( ) ) . thenReturn ( templateName ) ; org . mockito . Mockito . doThrow ( new com . cloud . exception . InternalErrorException ( "virtual<sp>size<sp>calculation<sp>failed" ) ) . when ( processor ) . getTemplateVirtualSize ( templatePath , templateName ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( mockFile , org . mockito . Mockito . times ( 1 ) ) . length ( ) ; } getVirtualSize ( java . io . InputStream ) { byte [ ] bytes = new byte [ com . cloud . utils . storage . QCOW2Utils . VIRTUALSIZE_HEADER_LENGTH ] ; if ( ( inputStream . skip ( com . cloud . utils . storage . QCOW2Utils . VIRTUALSIZE_HEADER_LOCATION ) ) != ( com . cloud . utils . storage . QCOW2Utils . VIRTUALSIZE_HEADER_LOCATION ) ) { throw new java . io . IOException ( "Unable<sp>to<sp>skip<sp>to<sp>the<sp>virtual<sp>size<sp>header" ) ; } if ( ( inputStream . read ( bytes ) ) != ( com . cloud . utils . storage . QCOW2Utils . VIRTUALSIZE_HEADER_LENGTH ) ) { throw new java . io . IOException ( "Unable<sp>to<sp>properly<sp>read<sp>the<sp>size" ) ; } return com . cloud . utils . NumbersUtil . bytesToLong ( bytes ) ; }
org . junit . Assert . assertEquals ( actualSize , processor . getVirtualSize ( mockFile ) )
availableTest3 ( ) { com . navercorp . pinpoint . profiler . sender . RetryMessage retryMessage = new com . navercorp . pinpoint . profiler . sender . RetryMessage ( 2 , 2 , new byte [ 0 ] ) ; "<AssertPlaceHolder>" ; } isRetryAvailable ( ) { return ( retryCount ) < ( maxRetryCount ) ; }
org . junit . Assert . assertFalse ( retryMessage . isRetryAvailable ( ) )
testUsingBindingInstanceIdentifier ( ) { materializeWithExclusions ( org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . mdsal . test . augment . rev140709 . TreeLeafOnlyAugment . class , org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . mdsal . test . augment . rev140709 . TreeComplexUsesAugment . class ) ; mockedContext . includeClass ( org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . mdsal . test . augment . rev140709 . TreeLeafOnlyAugment . class ) ; final org . opendaylight . yangtools . yang . data . api . YangInstanceIdentifier domYY = registry . toYangInstanceIdentifier ( org . opendaylight . mdsal . binding . dom . codec . test . AugmentationClassDiscoveredAfterCodecTest . BA_TREE_LEAF_ONLY ) ; "<AssertPlaceHolder>" ; } toYangInstanceIdentifier ( org . opendaylight . yangtools . yang . binding . InstanceIdentifier ) { return codecContext . getInstanceIdentifierCodec ( ) . serialize ( binding ) ; }
org . junit . Assert . assertNotNull ( domYY )
testGetOrder ( ) { org . openscience . cdk . interfaces . IBond b = ( ( org . openscience . cdk . interfaces . IBond ) ( newChemObject ( ) ) ) ; org . openscience . cdk . interfaces . IAtom c = b . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ; org . openscience . cdk . interfaces . IAtom o = b . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "O" ) ; b . setAtom ( c , 0 ) ; b . setAtom ( o , 1 ) ; b . setOrder ( Order . DOUBLE ) ; "<AssertPlaceHolder>" ; } getOrder ( ) { logger . debug ( "Getting<sp>order:<sp>" , super . getOrder ( ) ) ; return super . getOrder ( ) ; }
org . junit . Assert . assertEquals ( IBond . Order . DOUBLE , b . getOrder ( ) )
testShouldTypeIntoInputElementsThatHaveNoTypeAttribute ( ) { driver . get ( pages . formPage ) ; org . openqa . selenium . WebElement element = driver . findElement ( org . openqa . selenium . By . id ( "no-type" ) ) ; element . sendKeys ( "should<sp>say<sp>cheese" ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { return commandProcessor . getString ( "getAttribute" , new java . lang . String [ ] { attributeLocator } ) ; }
org . junit . Assert . assertThat ( element . getAttribute ( "value" ) , org . hamcrest . Matchers . is ( "should<sp>say<sp>cheese" ) )
testBusyWorker ( ) { java . util . List < java . lang . String > busyWorkers = new java . util . ArrayList ( ) ; busyWorkers . add ( "worker1" ) ; when ( executionQueueRepository . getBusyWorkers ( ExecStatus . ASSIGNED ) ) . thenReturn ( busyWorkers ) ; busyWorkersService . findBusyWorkers ( ) ; "<AssertPlaceHolder>" ; } isWorkerBusy ( java . lang . String ) { return busyWorkersMap . containsKey ( workerId ) ; }
org . junit . Assert . assertTrue ( busyWorkersService . isWorkerBusy ( "worker1" ) )
testPushPullBlockingQueueTestC1 ( ) { final int cap = 10 ; java . util . concurrent . BlockingQueue < java . lang . Integer > dbq = new com . conversantmedia . util . concurrent . PushPullBlockingQueue < java . lang . Integer > ( cap ) ; while ( dbq . offer ( java . lang . Integer . valueOf ( 0 ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return stackTop . get ( ) ; }
org . junit . Assert . assertEquals ( 16 , dbq . size ( ) )
getSubscriptionsForOrganization_PerformanceHint_Authorized ( ) { java . lang . reflect . Method method = beanClass . getMethod ( "getSubscriptionsForOrganization" , org . oscm . internal . types . enumtypes . PerformanceHint . class ) ; boolean isSubscriptionManagerRoleAllowed = isRoleAllowed ( method , UserRoleType . SUBSCRIPTION_MANAGER ) ; "<AssertPlaceHolder>" ; } isRoleAllowed ( java . lang . reflect . Method , org . oscm . internal . types . enumtypes . UserRoleType ) { javax . annotation . security . RolesAllowed rolesAllowed = method . getAnnotation ( javax . annotation . security . RolesAllowed . class ) ; if ( rolesAllowed == null ) { return true ; } for ( java . lang . String role : rolesAllowed . value ( ) ) { if ( role . equals ( roleType . name ( ) ) ) { return true ; } } return false ; }
org . junit . Assert . assertTrue ( isSubscriptionManagerRoleAllowed )
Query15Test ( ) { org . verdictdb . core . sqlobject . AbstractRelation supplier = new org . verdictdb . core . sqlobject . BaseTable ( "tpch" , "max" 5 , "r" 1 ) ; org . verdictdb . core . sqlobject . AbstractRelation revenue = new org . verdictdb . core . sqlobject . BaseTable ( "tpch" , "max" 3 , "r" ) ; org . verdictdb . core . sqlobject . SelectQuery subquery = org . verdictdb . core . sqlobject . SelectQuery . create ( java . util . Arrays . < org . verdictdb . core . sqlobject . SelectItem > asList ( new org . verdictdb . core . sqlobject . ColumnOp ( "max" , new org . verdictdb . core . sqlobject . BaseColumn ( "r" , "r" 0 ) ) ) , revenue ) ; org . verdictdb . core . sqlobject . SelectQuery relation = org . verdictdb . core . sqlobject . SelectQuery . create ( java . util . Arrays . < org . verdictdb . core . sqlobject . SelectItem > asList ( new org . verdictdb . core . sqlobject . BaseColumn ( "r" 1 , "r" 3 ) , new org . verdictdb . core . sqlobject . BaseColumn ( "r" 1 , "max" 4 ) , new org . verdictdb . core . sqlobject . BaseColumn ( "r" 1 , "max" 9 ) , new org . verdictdb . core . sqlobject . BaseColumn ( "r" 1 , "r" 2 ) , new org . verdictdb . core . sqlobject . BaseColumn ( "r" , "r" 0 ) ) , java . util . Arrays . asList ( supplier , revenue ) ) ; relation . addFilterByAnd ( new org . verdictdb . core . sqlobject . ColumnOp ( "max" 7 , java . util . Arrays . < org . verdictdb . core . sqlobject . UnnamedColumn > asList ( new org . verdictdb . core . sqlobject . BaseColumn ( "r" 1 , "r" 3 ) , new org . verdictdb . core . sqlobject . BaseColumn ( "r" , "supplier_no" ) ) ) ) ; relation . addFilterByAnd ( new org . verdictdb . core . sqlobject . ColumnOp ( "max" 7 , java . util . Arrays . < org . verdictdb . core . sqlobject . UnnamedColumn > asList ( new org . verdictdb . core . sqlobject . BaseColumn ( "r" , "r" 0 ) , org . verdictdb . core . sqlobject . SubqueryColumn . getSubqueryColumn ( subquery ) ) ) ) ; relation . addOrderby ( new org . verdictdb . core . sqlobject . OrderbyAttribute ( "r" 3 ) ) ; relation . addLimit ( org . verdictdb . core . sqlobject . ConstantColumn . valueOf ( 1 ) ) ; java . lang . String expected = "r" 6 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "max" 2 + "max" 0 ) + "s.`s_address`,<sp>" ) + "r" 7 ) + "r.`total_revenue`<sp>" ) + "r" 5 ) + "`tpch`.`supplier`<sp>as<sp>s,<sp>" ) + "r" 8 ) + "where<sp>" ) + "max" 6 ) + "and<sp>(r.`total_revenue`<sp>=<sp>(" ) + "r" 6 ) + "r" 9 ) + "r" 5 ) + "`tpch`.`supplier`<sp>as<sp>s,<sp>" 0 ) + "))<sp>" ) + "max" 1 ) + "max" 8 ) + "r" 4 ) ; org . verdictdb . sqlwriter . SelectQueryToSql relToSql = new org . verdictdb . sqlwriter . SelectQueryToSql ( new org . verdictdb . sqlsyntax . HiveSyntax ( ) ) ; java . lang . String actual = relToSql . toSql ( relation ) ; "<AssertPlaceHolder>" ; } toSql ( org . verdictdb . core . sqlobject . InsertValuesQuery ) { java . lang . StringBuilder sql = new java . lang . StringBuilder ( ) ; java . lang . String schemaName = query . getSchemaName ( ) ; java . lang . String tableName = query . getTableName ( ) ; java . util . List < java . lang . Object > values = query . getValues ( ) ; sql . append ( "insert<sp>into<sp>" ) ; sql . append ( quoteName ( schemaName ) ) ; sql . append ( "." ) ; sql . append ( quoteName ( tableName ) ) ; sql . append ( "<sp>values<sp>(" ) ; boolean isFirst = true ; for ( java . lang . Object v : values ) { if ( isFirst == false ) { sql . append ( ",<sp>" ) ; } if ( v instanceof org . verdictdb . commons . VerdictTimestamp ) { if ( ( syntax ) instanceof org . verdictdb . sqlsyntax . PrestoSyntax ) { sql . append ( ( ( "timestamp<sp>'" + ( v . toString ( ) ) ) + "'" ) ) ; } else { sql . append ( ( ( "'" + ( v . toString ( ) ) ) + "'" ) ) ; } } else if ( v instanceof java . lang . String ) { sql . append ( ( ( "'" + v ) + "'" ) ) ; } else { sql . append ( v . toString ( ) ) ; } isFirst = false ; } sql . append ( ")" ) ; return sql . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
shouldParseMultipleHostAndPorts ( ) { parameters . put ( org . apache . flume . sink . elasticsearch . ElasticSearchSinkConstants . HOSTNAMES , "10.5.5.27:9300,10.5.5.28:9301,10.5.5.29:9302" ) ; fixture = new org . apache . flume . sink . elasticsearch . ElasticSearchSink ( ) ; fixture . configure ( new org . apache . flume . Context ( parameters ) ) ; java . lang . String [ ] expected = new java . lang . String [ ] { "10.5.5.27:9300" , "10.5.5.28:9301" , "10.5.5.29:9302" } ; "<AssertPlaceHolder>" ; } getServerAddresses ( ) { return serverAddresses ; }
org . junit . Assert . assertArrayEquals ( expected , fixture . getServerAddresses ( ) )
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . invitation . invite . members . model . MemberRequest . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . eq ( "memberRequestId" , com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ) ; java . util . List < com . liferay . invitation . invite . members . model . MemberRequest > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
sumInteger ( ) { org . eclipse . collections . api . RichIterable < java . lang . Integer > objects = this . newWith ( 1 , 2 , 3 ) ; long expected = objects . injectInto ( 0L , AddFunction . INTEGER_TO_LONG ) ; long actual = objects . sumOfInt ( ( integer ) -> integer ) ; "<AssertPlaceHolder>" ; } sumOfInt ( org . eclipse . collections . api . block . function . primitive . IntFunction ) { return 0 ; }
org . junit . Assert . assertEquals ( expected , actual )
testClassForNameWithoutCtxCL ( ) { final java . lang . ClassLoader cl = java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) ; try { java . lang . Thread . currentThread ( ) . setContextClassLoader ( null ) ; java . lang . Class < ? > clazz = org . jacorb . util . ObjectUtil . classForName ( "org.jacorb.orb.ORB" ) ; "<AssertPlaceHolder>" ; } finally { java . lang . Thread . currentThread ( ) . setContextClassLoader ( cl ) ; } } classForName ( java . lang . String ) { if ( name == null ) { throw new java . lang . IllegalArgumentException ( "Class<sp>name<sp>must<sp>not<sp>be<sp>null!" ) ; } if ( org . jacorb . config . JacORBConfiguration . useTCCL ) { try { return java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) . loadClass ( name ) ; } catch ( java . lang . Exception e ) { return java . lang . Class . forName ( name ) ; } } else { return java . lang . Class . forName ( name ) ; } }
org . junit . Assert . assertNotNull ( clazz )
testNoCollectionFacet ( ) { final org . apache . isis . core . metamodel . facetapi . Facet facet = specification . getFacet ( org . apache . isis . core . metamodel . facets . collections . modify . CollectionFacet . class ) ; "<AssertPlaceHolder>" ; } getFacet ( java . lang . Class ) { final org . apache . isis . core . metamodel . facetapi . FacetHolder facetHolder = getAction ( ) ; return facetHolder . getFacet ( facetType ) ; }
org . junit . Assert . assertNull ( facet )
testActieGemeenteGelijkAanBronGemeente ( ) { final nl . bzk . brp . model . bericht . kern . HuwelijkGeregistreerdPartnerschapBericht nieuwSituatie = maakNieuwSituatie ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . verbintenis . BRAL2110Test . GEMEENTE_AMSTERDAM ) ; final nl . bzk . brp . model . bericht . kern . ActieBericht actieBericht = maakActieBericht ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . verbintenis . BRAL2110Test . PARTIJ_AMSTERDAM , nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . verbintenis . BRAL2110Test . PARTIJ_AMSTERDAM ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteits = bral2110 . voerRegelUit ( null , nieuwSituatie , actieBericht , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , berichtEntiteits . size ( ) )
testDiagnosticOrderResources ( ) { ca . uhn . fhir . rest . client . api . IGenericClient client = ourClient ; int initialSize = client . search ( ) . forResource ( ca . uhn . fhir . model . dstu2 . resource . DiagnosticOrder . class ) . returnBundle ( ca . uhn . fhir . model . dstu2 . resource . Bundle . class ) . execute ( ) . getEntry ( ) . size ( ) ; ca . uhn . fhir . model . dstu2 . resource . DiagnosticOrder res = new ca . uhn . fhir . model . dstu2 . resource . DiagnosticOrder ( ) ; res . addIdentifier ( ) . setSystem ( "urn:foo" ) . setValue ( "123" ) ; client . create ( ) . resource ( res ) . execute ( ) ; int newSize = client . search ( ) . forResource ( ca . uhn . fhir . model . dstu2 . resource . DiagnosticOrder . class ) . returnBundle ( ca . uhn . fhir . model . dstu2 . resource . Bundle . class ) . execute ( ) . getEntry ( ) . size ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return nativeArray . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , ( newSize - initialSize ) )
editBillingAddress_NoneAction_SameBillingContact ( ) { org . oscm . domobjects . Subscription sub = givenSubscriptionWithBillingAddress1 ( ) ; org . oscm . domobjects . BillingContact bcNew = givenBillingContact1 ( ) ; editBillingAddress ( sub , bcNew ) ; java . util . List < org . oscm . auditlog . model . AuditLogEntry > logEntries = org . oscm . auditlog . AuditLogData . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return org . oscm . auditlog . AuditLogData . auditLogData . get ( ) ; }
org . junit . Assert . assertNull ( logEntries )
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . EmailAddress . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "emailAddressId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "emailAddressId" , new java . lang . Object [ ] { com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) } ) ) ; java . util . List < java . lang . Object > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
testMatch_any ( ) { final org . erlide . util . erlang . OtpBindings r = org . erlide . util . erlang . OtpErlang . match ( "[_,<sp>{_}]" , "[a,<sp>{b}]" ) ; "<AssertPlaceHolder>" ; } match ( java . lang . String , java . lang . String ) { return org . erlide . util . erlang . OtpErlang . match ( org . erlide . util . erlang . OtpErlang . parse ( pattern ) , org . erlide . util . erlang . OtpErlang . parse ( term ) , new org . erlide . util . erlang . OtpBindings ( ) ) ; }
org . junit . Assert . assertNotNull ( r )
testEmptyTransaction ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 0 , 0 )
testParseString ( ) { java . lang . String inputString = "BPR*DATA*NOT*VALID*RANDOM*TEXT~" 3 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "GS*1212*SENDERID*RECEIVERID*0701*000000001*X*00401~" + "SE*24*000000001~" 1 ) + "BPR*DATA*NOT*VALID*RANDOM*TEXT~" ) + "SE*24*000000001~" 2 ) + "DTM*111*20090915~" ) + "N1*PR*ALWAYS<sp>INSURANCE<sp>COMPANY~" ) + "BPR*DATA*NOT*VALID*RANDOM*TEXT~" 4 ) + "BPR*DATA*NOT*VALID*RANDOM*TEXT~" 1 ) + "REF*DT*435864864~" ) + "N1*PE*FI*888888888*P.O.BOX<sp>456*SHINE<sp>CITY*GREEN<sp>STATE*ZIP*EARTH~" ) + "LX*1~" ) + "BPR*DATA*NOT*VALID*RANDOM*TEXT~" 0 ) + "BPR*DATA*NOT*VALID*RANDOM*TEXT~" 7 ) + "BPR*DATA*NOT*VALID*RANDOM*TEXT~" 8 ) + "DTM*273*20020824~" ) + "BPR*DATA*NOT*VALID*RANDOM*TEXT~" 5 ) + "BPR*DATA*NOT*VALID*RANDOM*TEXT~" 6 ) + "SE*24*000000001~" 6 ) + "BPR*DATA*NOT*VALID*RANDOM*TEXT~" 9 ) + "SE*24*000000001~" 5 ) + "SE*24*000000001~" 0 ) + "DTM*273*20020824~" ) + "SE*24*000000001~" 4 ) + "SE*24*000000001~" 3 ) + "SE*24*000000001~" ) + "BPR*DATA*NOT*VALID*RANDOM*TEXT~" 2 ) + "IEA*1*000000001~" ) ; org . pb . x12 . Parser parser = new org . pb . x12 . X12SimpleParser ( ) ; org . pb . x12 . X12Simple x12 = ( ( org . pb . x12 . X12Simple ) ( parser . parse ( inputString ) ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder dump = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < ( depth ) ; i ++ ) { dump . append ( "|<sp>" ) ; } dump . append ( "+--" ) ; dump . append ( name ) ; if ( ( segment ) != null ) dump . append ( "<sp>-<sp>" ) . append ( segment ) ; if ( ( segmentQuals ) != null ) { dump . append ( "<sp>-<sp>" ) ; for ( java . lang . String s : segmentQuals ) { dump . append ( s ) . append ( "," ) ; } } if ( ( segmentQualPos ) != null ) dump . append ( "<sp>-<sp>" ) . append ( segmentQualPos ) ; dump . append ( java . lang . System . getProperty ( "line.separator" ) ) ; for ( org . pb . x12 . Cf cf : children ) { dump . append ( cf . toString ( ) ) ; } return dump . toString ( ) ; }
org . junit . Assert . assertEquals ( inputString , x12 . toString ( ) )
testEqualsObj ( ) { org . apache . eagle . audit . entity . GenericAuditEntity genericAuditEntity = new org . apache . eagle . audit . entity . GenericAuditEntity ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( obj == null ) || ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) ) { return false ; } final org . apache . eagle . security . entity . HBaseResourceEntity other = ( ( org . apache . eagle . security . entity . HBaseResourceEntity ) ( obj ) ) ; return ( ( ( ( ( com . google . common . base . Objects . equal ( this . resource , other . resource ) ) && ( this . namespace . equals ( other . namespace ) ) ) && ( this . table . equals ( other . table ) ) ) && ( this . columnFamily . equals ( other . columnFamily ) ) ) && ( this . sensitiveType . equals ( other . sensitiveType ) ) ) && ( this . childSensitiveTypes . containsAll ( other . childSensitiveTypes ) ) ; }
org . junit . Assert . assertTrue ( genericAuditEntity . equals ( genericAuditEntity ) )
testRemoveAllNodes ( ) { np . removeAllNodes ( ) ; "<AssertPlaceHolder>" ; } getNumberOfNodes ( ) { return nodes . size ( ) ; }
org . junit . Assert . assertEquals ( np . getNumberOfNodes ( ) , 0 )
testWriteJson ( ) { java . nio . file . Path jsonFile = java . nio . file . Paths . get ( com . google . common . io . Resources . getResource ( "core/json/basic.json" ) . toURI ( ) ) ; java . lang . String expectedJson = new java . lang . String ( java . nio . file . Files . readAllBytes ( jsonFile ) , java . nio . charset . StandardCharsets . UTF_8 ) ; com . google . cloud . tools . jib . json . JsonTemplateMapperTest . TestJson testJson = new com . google . cloud . tools . jib . json . JsonTemplateMapperTest . TestJson ( ) ; testJson . number = 54 ; testJson . text = "crepecake" ; testJson . digest = com . google . cloud . tools . jib . image . DescriptorDigest . fromDigest ( "sha256:8c662931926fa990b41da3c9f42663a537ccd498130030f9149173a0493832ad" ) ; testJson . innerObject = new com . google . cloud . tools . jib . json . JsonTemplateMapperTest . TestJson . InnerObject ( ) ; testJson . innerObject . number = 23 ; testJson . innerObject . texts = java . util . Arrays . asList ( "first<sp>text" , "second<sp>text" ) ; testJson . innerObject . digests = java . util . Arrays . asList ( com . google . cloud . tools . jib . image . DescriptorDigest . fromDigest ( "sha256:91e0cae00b86c289b33fee303a807ae72dd9f0315c16b74e6ab0cdbe9d996c10" ) , com . google . cloud . tools . jib . image . DescriptorDigest . fromHash ( "4945ba5011739b0b98c4a41afe224e417f47c7c99b2ce76830999c9a0861b236" ) ) ; com . google . cloud . tools . jib . json . JsonTemplateMapperTest . TestJson . InnerObject innerObject1 = new com . google . cloud . tools . jib . json . JsonTemplateMapperTest . TestJson . InnerObject ( ) ; innerObject1 . number = 42 ; innerObject1 . texts = java . util . Collections . emptyList ( ) ; com . google . cloud . tools . jib . json . JsonTemplateMapperTest . TestJson . InnerObject innerObject2 = new com . google . cloud . tools . jib . json . JsonTemplateMapperTest . TestJson . InnerObject ( ) ; innerObject2 . number = 99 ; innerObject2 . texts = java . util . Collections . singletonList ( "some<sp>text" ) ; innerObject2 . digests = java . util . Collections . singletonList ( com . google . cloud . tools . jib . image . DescriptorDigest . fromDigest ( "sha256:d38f571aa1c11e3d516e0ef7e513e7308ccbeb869770cb8c4319d63b10a0075e" ) ) ; testJson . list = java . util . Arrays . asList ( innerObject1 , innerObject2 ) ; java . io . ByteArrayOutputStream jsonStream = new java . io . ByteArrayOutputStream ( ) ; com . google . cloud . tools . jib . json . JsonTemplateMapper . toBlob ( testJson ) . writeTo ( jsonStream ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "LogEvent<sp>[level=" + ( level ) ) + ",<sp>message=" ) + ( message ) ) + "]" ; }
org . junit . Assert . assertEquals ( expectedJson , jsonStream . toString ( ) )
getPatternWtihSamePatternTest ( ) { com . orange . ngsi . model . EntityId entityId = new com . orange . ngsi . model . EntityId ( "A*" , "string" , true ) ; com . orange . cepheus . broker . Patterns patterns = new com . orange . cepheus . broker . Patterns ( ) ; java . util . regex . Pattern pattern = patterns . getPattern ( entityId ) ; "<AssertPlaceHolder>" ; } getPattern ( com . orange . ngsi . model . EntityId ) { if ( ! ( entityId . getIsPattern ( ) ) ) { return null ; } java . lang . String id = entityId . getId ( ) ; java . util . regex . Pattern pattern = cachedPatterns . get ( id ) ; if ( pattern == null ) { pattern = java . util . regex . Pattern . compile ( id ) ; cachedPatterns . put ( id , pattern ) ; } return pattern ; }
org . junit . Assert . assertEquals ( pattern , patterns . getPattern ( entityId ) )
testAllocateAndReleaseContainers ( ) { int testAppId = 1 ; org . apache . hadoop . yarn . api . protocolrecords . RegisterApplicationMasterResponse registerResponse = registerApplicationMaster ( testAppId ) ; "<AssertPlaceHolder>" ; java . util . List < org . apache . hadoop . yarn . api . records . Container > containers = getContainersAndAssert ( testAppId , 10 ) ; releaseContainersAndAssert ( testAppId , containers ) ; finishApplicationMaster ( testAppId , FinalApplicationStatus . SUCCEEDED ) ; } registerApplicationMaster ( org . apache . hadoop . yarn . api . protocolrecords . RegisterApplicationMasterRequest ) { org . apache . hadoop . yarn . security . AMRMTokenIdentifier amrmTokenIdentifier = org . apache . hadoop . yarn . server . utils . YarnServerSecurityUtils . authorizeRequest ( ) ; org . apache . hadoop . yarn . api . records . ApplicationAttemptId applicationAttemptId = amrmTokenIdentifier . getApplicationAttemptId ( ) ; org . apache . hadoop . yarn . api . records . ApplicationId appID = applicationAttemptId . getApplicationId ( ) ; org . apache . hadoop . yarn . server . resourcemanager . ApplicationMasterService . AllocateResponseLock lock = responseMap . get ( applicationAttemptId ) ; if ( lock == null ) { org . apache . hadoop . yarn . server . resourcemanager . RMAuditLogger . logFailure ( amrmTokenIdentifier . getUser ( ) . getUserName ( ) , AuditConstants . REGISTER_AM , ( "Application<sp>doesn't<sp>exist<sp>in<sp>cache<sp>" + applicationAttemptId ) , "Setting<sp>client<sp>token<sp>master<sp>key" 1 , "Error<sp>in<sp>registering<sp>application<sp>master" , appID , applicationAttemptId ) ; throwApplicationDoesNotExistInCacheException ( applicationAttemptId ) ; } synchronized ( lock ) { org . apache . hadoop . yarn . api . protocolrecords . AllocateResponse lastResponse = lock . getAllocateResponse ( ) ; if ( hasApplicationMasterRegistered ( applicationAttemptId ) ) { java . lang . String message = "Setting<sp>client<sp>token<sp>master<sp>key" 0 + appID ; org . apache . hadoop . yarn . server . resourcemanager . ApplicationMasterService . LOG . warn ( message ) ; org . apache . hadoop . yarn . server . resourcemanager . RMAuditLogger . logFailure ( this . rmContext . getRMApps ( ) . get ( appID ) . getUser ( ) , AuditConstants . REGISTER_AM , "" , "Setting<sp>client<sp>token<sp>master<sp>key" 1 , message , appID , applicationAttemptId ) ; throw new org . apache . hadoop . yarn . exceptions . InvalidApplicationMasterRequestException ( message ) ; } this . amLivelinessMonitor . receivedPing ( applicationAttemptId ) ; org . apache . hadoop . yarn . server . resourcemanager . rmapp . RMApp app = this . rmContext . getRMApps ( ) . get ( appID ) ; lastResponse . setResponseId ( 0 ) ; lock . setAllocateResponse ( lastResponse ) ; org . apache . hadoop . yarn . server . resourcemanager . ApplicationMasterService . LOG . info ( ( "AM<sp>registration<sp>" + applicationAttemptId ) ) ; this . rmContext . getDispatcher ( ) . getEventHandler ( ) . handle ( new org . apache . hadoop . yarn . server . resourcemanager . rmapp . attempt . event . RMAppAttemptRegistrationEvent ( applicationAttemptId , request . getHost ( ) , request . getRpcPort ( ) , request . getTrackingUrl ( ) ) ) ; org . apache . hadoop . yarn . server . resourcemanager . RMAuditLogger . logSuccess ( app . getUser ( ) , AuditConstants . REGISTER_AM , "Setting<sp>client<sp>token<sp>master<sp>key" 1 , appID , applicationAttemptId ) ; org . apache . hadoop . yarn . api . protocolrecords . RegisterApplicationMasterResponse response = recordFactory . newRecordInstance ( org . apache . hadoop . yarn . api . protocolrecords . RegisterApplicationMasterResponse . class ) ; response . setMaximumResourceCapability ( rScheduler . getMaximumResourceCapability ( app . getQueue ( ) ) ) ; response . setApplicationACLs ( app . getRMAppAttempt ( applicationAttemptId ) . getSubmissionContext ( ) . getAMContainerSpec ( ) . getApplicationACLs ( ) ) ; response . setQueue ( app . getQueue ( ) ) ; if ( org . apache . hadoop . security . UserGroupInformation . isSecurityEnabled ( ) ) { org . apache . hadoop . yarn . server . resourcemanager . ApplicationMasterService . LOG . info ( "Setting<sp>client<sp>token<sp>master<sp>key" ) ; response . setClientToAMTokenMasterKey ( java . nio . ByteBuffer . wrap ( rmContext . getClientToAMTokenSecretManager ( ) . getMasterKey ( applicationAttemptId ) . getEncoded ( ) ) ) ; } if ( app . getApplicationSubmissionContext ( ) . getKeepContainersAcrossApplicationAttempts ( ) ) { java . util . List < org . apache . hadoop . yarn . api . records . Container > transferredContainers = rScheduler . getTransferredContainers ( applicationAttemptId ) ; if ( ! ( transferredContainers . isEmpty ( ) ) ) { response . setContainersFromPreviousAttempts ( transferredContainers ) ; java . util . List < org . apache . hadoop . yarn . api . records . NMToken > nmTokens = new java . util . ArrayList < org . apache . hadoop . yarn . api . records . NMToken > ( ) ; for ( org . apache . hadoop . yarn . api . records . Container container : transferredContainers ) { try { org . apache . hadoop . yarn . api . records . NMToken token = rmContext . getNMTokenSecretManager ( ) . createAndGetNMToken ( app . getUser ( ) , applicationAttemptId , container ) ; if ( null != token ) { nmTokens . add ( token ) ; } } catch ( java . lang . IllegalArgumentException e ) { if ( ( e . getCause ( ) ) instanceof java . net . UnknownHostException ) { throw ( ( java . net . UnknownHostException ) ( e . getCause ( ) ) ) ; } } } response . setNMTokensFromPreviousAttempts ( nmTokens ) ; org . apache . hadoop . yarn . server . resourcemanager . ApplicationMasterService . LOG . info ( ( ( ( ( ( ( ( "Application<sp>" + appID ) + "<sp>retrieved<sp>" ) + ( transferredContainers . size ( ) ) ) + "<sp>containers<sp>from<sp>previous" ) + "<sp>attempts<sp>and<sp>" ) + ( nmTokens . size ( ) ) ) + "<sp>NM<sp>tokens."
org . junit . Assert . assertNotNull ( registerResponse )
testIsPresentlyValidBeforeNotBefore ( ) { org . w3c . dom . Element issuedAssertion = this . readDocument ( "/saml.xml" ) . getDocumentElement ( ) ; issuedAssertion . getElementsByTagName ( "saml2:Conditions" ) . item ( 0 ) . getAttributes ( ) . getNamedItem ( "NotBefore" ) . setNodeValue ( getNowWithOffset ( 1 ) ) ; ddf . security . assertion . impl . SecurityAssertionImpl assertion = getSecurityAssertion ( issuedAssertion ) ; "<AssertPlaceHolder>" ; } isPresentlyValid ( ) { java . util . Date now = new java . util . Date ( ) ; if ( ( ( getNotBefore ( ) ) != null ) && ( now . before ( getNotBefore ( ) ) ) ) { ddf . security . assertion . impl . SecurityAssertionImpl . LOGGER . debug ( "SAML<sp>Assertion<sp>Time<sp>Bound<sp>Check<sp>Failed." ) ; ddf . security . assertion . impl . SecurityAssertionImpl . LOGGER . debug ( "\t<sp>Checked<sp>time<sp>of<sp>{}<sp>is<sp>before<sp>the<sp>NotBefore<sp>time<sp>of<sp>{}" , now , getNotBefore ( ) ) ; return false ; } if ( ( ( getNotOnOrAfter ( ) ) != null ) && ( ( now . equals ( getNotOnOrAfter ( ) ) ) || ( now . after ( getNotOnOrAfter ( ) ) ) ) ) { ddf . security . assertion . impl . SecurityAssertionImpl . LOGGER . debug ( "SAML<sp>Assertion<sp>Time<sp>Bound<sp>Check<sp>Failed." ) ; ddf . security . assertion . impl . SecurityAssertionImpl . LOGGER . debug ( "\t<sp>Checked<sp>time<sp>of<sp>{}<sp>is<sp>equal<sp>to<sp>or<sp>after<sp>the<sp>NotOnOrAfter<sp>time<sp>of<sp>{}" , now , getNotOnOrAfter ( ) ) ; return false ; } return true ; }
org . junit . Assert . assertFalse ( assertion . isPresentlyValid ( ) )
testFindByRequestTableAndRequestId ( ) { java . lang . String requestTable1 = "alpha" ; java . lang . String requestTable2 = "bravo" ; int requestId1 = 101 ; int requestId2 = 202 ; org . oscarehr . common . model . LabRequestReportLink lRRL1 = new org . oscarehr . common . model . LabRequestReportLink ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( lRRL1 ) ; lRRL1 . setRequestTable ( requestTable2 ) ; lRRL1 . setRequestId ( requestId1 ) ; dao . persist ( lRRL1 ) ; org . oscarehr . common . model . LabRequestReportLink lRRL2 = new org . oscarehr . common . model . LabRequestReportLink ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( lRRL2 ) ; lRRL2 . setRequestTable ( requestTable1 ) ; lRRL2 . setRequestId ( requestId1 ) ; dao . persist ( lRRL2 ) ; org . oscarehr . common . model . LabRequestReportLink lRRL3 = new org . oscarehr . common . model . LabRequestReportLink ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( lRRL3 ) ; lRRL3 . setRequestTable ( requestTable1 ) ; lRRL3 . setRequestId ( requestId2 ) ; dao . persist ( lRRL3 ) ; org . oscarehr . common . model . LabRequestReportLink lRRL4 = new org . oscarehr . common . model . LabRequestReportLink ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( lRRL4 ) ; lRRL4 . setRequestTable ( requestTable1 ) ; lRRL4 . setRequestId ( requestId1 ) ; dao . persist ( lRRL4 ) ; org . oscarehr . common . model . LabRequestReportLink lRRL5 = new org . oscarehr . common . model . LabRequestReportLink ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( lRRL5 ) ; lRRL5 . setRequestTable ( requestTable2 ) ; lRRL5 . setRequestId ( requestId2 ) ; dao . persist ( lRRL5 ) ; org . oscarehr . common . model . LabRequestReportLink lRRL6 = new org . oscarehr . common . model . LabRequestReportLink ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( lRRL6 ) ; lRRL6 . setRequestTable ( requestTable1 ) ; lRRL6 . setRequestId ( requestId1 ) ; dao . persist ( lRRL6 ) ; java . util . List < org . oscarehr . common . model . LabRequestReportLink > expectedResult = new java . util . ArrayList < org . oscarehr . common . model . LabRequestReportLink > ( java . util . Arrays . asList ( lRRL2 , lRRL4 , lRRL6 ) ) ; java . util . List < org . oscarehr . common . model . LabRequestReportLink > result = dao . findByRequestTableAndRequestId ( requestTable1 , requestId1 ) ; org . apache . log4j . Logger logger = org . oscarehr . util . MiscUtils . getLogger ( ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Items<sp>do<sp>not<sp>match." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
org . junit . Assert . assertTrue ( true )
testAddName ( ) { final org . apache . oozie . fluentjob . api . workflow . WorkflowBuilder builder = new org . apache . oozie . fluentjob . api . workflow . WorkflowBuilder ( ) ; builder . withName ( org . apache . oozie . fluentjob . api . workflow . TestWorkflowBuilder . NAME ) ; final org . apache . oozie . fluentjob . api . workflow . Workflow workflow = builder . build ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( org . apache . oozie . fluentjob . api . workflow . TestWorkflowBuilder . NAME , workflow . getName ( ) )
findState_finalSearchNestedIgnored ( ) { cruise . umple . compiler . State s1 = new cruise . umple . compiler . State ( "s1" , sm ) ; cruise . umple . compiler . StateMachine innerSm = new cruise . umple . compiler . StateMachine ( "innerSm" ) ; s1 . addNestedStateMachine ( innerSm ) ; new cruise . umple . compiler . State ( "Final" , innerSm ) ; cruise . umple . compiler . State alsoFinal = sm . findState ( "Final" , true ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( null , alsoFinal )
testNeighborId ( ) { deviceInformation . setNeighborId ( org . onlab . packet . Ip4Address . valueOf ( "1.1.1.1" ) ) ; "<AssertPlaceHolder>" ; } neighborId ( ) { return neighborId ; }
org . junit . Assert . assertThat ( deviceInformation . neighborId ( ) , org . hamcrest . CoreMatchers . is ( org . onlab . packet . Ip4Address . valueOf ( "1.1.1.1" ) ) )
testReturnWorkdays ( ) { java . util . Calendar expCal = org . apache . poi . util . LocaleUtil . getLocaleCalendar ( 2009 , 3 , 30 ) ; java . util . Date expDate = expCal . getTime ( ) ; org . apache . poi . ss . formula . eval . ValueEval [ ] ve = new org . apache . poi . ss . formula . eval . ValueEval [ ] { new org . apache . poi . ss . formula . eval . StringEval ( org . apache . poi . ss . formula . atp . TestWorkdayFunction . STARTING_DATE ) , new org . apache . poi . ss . formula . eval . NumberEval ( 151 ) } ; java . util . Date actDate = org . apache . poi . ss . usermodel . DateUtil . getJavaDate ( ( ( org . apache . poi . ss . formula . eval . NumberEval ) ( WorkdayFunction . instance . evaluate ( ve , org . apache . poi . ss . formula . atp . TestWorkdayFunction . EC ) ) ) . getNumberValue ( ) ) ; "<AssertPlaceHolder>" ; } getNumberValue ( ) { return _value ; }
org . junit . Assert . assertEquals ( expDate , actDate )
shouldScheduleToNow ( ) { testRule . deploy ( PROCESS ) ; org . camunda . bpm . engine . impl . util . ClockUtil . setCurrentTime ( END_DATE ) ; java . lang . String processInstanceId = runtimeService . startProcessInstanceByKey ( PROCESS_KEY ) . getId ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { runtimeService . setVariable ( processInstanceId , ( "aVariableName" + i ) , "aVariableValue" ) ; } java . lang . String taskId = taskService . createTaskQuery ( ) . singleResult ( ) . getId ( ) ; taskService . complete ( taskId ) ; engineConfiguration . setHistoryCleanupBatchSize ( 5 ) ; engineConfiguration . initHistoryCleanup ( ) ; java . util . Date removalTime = org . apache . commons . lang3 . time . DateUtils . addDays ( END_DATE , 5 ) ; org . camunda . bpm . engine . impl . util . ClockUtil . setCurrentTime ( removalTime ) ; runHistoryCleanup ( ) ; org . camunda . bpm . engine . runtime . Job job = historyService . findHistoryCleanupJobs ( ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getDuedate ( ) { return duedate ; }
org . junit . Assert . assertThat ( job . getDuedate ( ) , org . hamcrest . core . Is . is ( removalTime ) )
itShouldBeCreatedWhenThereIsAtLeastOneActiveSubSender ( ) { io . datakernel . rpc . client . sender . helper . RpcClientConnectionPoolStub pool = new io . datakernel . rpc . client . sender . helper . RpcClientConnectionPoolStub ( ) ; io . datakernel . rpc . client . sender . helper . RpcSenderStub connection = new io . datakernel . rpc . client . sender . helper . RpcSenderStub ( ) ; pool . put ( io . datakernel . rpc . client . sender . RpcStrategyFirstValidResultTest . ADDRESS_2 , connection ) ; io . datakernel . rpc . client . sender . RpcStrategy firstValidResult = io . datakernel . rpc . client . sender . RpcStrategies . firstValidResult ( io . datakernel . rpc . client . sender . RpcStrategies . servers ( io . datakernel . rpc . client . sender . RpcStrategyFirstValidResultTest . ADDRESS_1 , io . datakernel . rpc . client . sender . RpcStrategyFirstValidResultTest . ADDRESS_2 ) ) ; "<AssertPlaceHolder>" ; } createSender ( io . datakernel . rpc . client . RpcClientConnectionPool ) { java . util . List < io . datakernel . rpc . client . sender . RpcSender > subSenders = list . listOfSenders ( pool ) ; if ( ( subSenders . size ( ) ) < ( minActiveSubStrategies ) ) return null ; if ( ( subSenders . size ( ) ) == 0 ) return null ; if ( ( subSenders . size ( ) ) == 1 ) return subSenders . get ( 0 ) ; return new io . datakernel . rpc . client . sender . RpcStrategyRoundRobin . Sender ( subSenders ) ; }
org . junit . Assert . assertNotNull ( firstValidResult . createSender ( pool ) )