input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testCompilePatternWithTerminatorMark ( ) { java . util . regex . Pattern pat = java . util . regex . Pattern . compile ( "a | org . junit . Assert . assertTrue ( mat . matches ( ) ) |
testSequenceFlowHashCode ( ) { org . kie . workbench . common . stunner . bpmn . definition . SequenceFlow a = new org . kie . workbench . common . stunner . bpmn . definition . SequenceFlow ( ) ; org . kie . workbench . common . stunner . bpmn . definition . SequenceFlow b = new org . kie . workbench . common . stunner . bpmn . definition . SequenceFlow ( ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return ( getPath ( ) ) != null ? getPath ( ) . hashCode ( ) : 0 ; } | org . junit . Assert . assertEquals ( a . hashCode ( ) , b . hashCode ( ) ) |
testBuildComponent ( ) { com . xpn . xwiki . objects . BaseObject baseObject = mock ( com . xpn . xwiki . objects . BaseObject . class ) ; com . xpn . xwiki . doc . XWikiDocument parentDocument = mock ( com . xpn . xwiki . doc . XWikiDocument . class ) ; org . xwiki . model . reference . DocumentReference documentReference = mock ( org . xwiki . model . reference . DocumentReference . class ) ; when ( baseObject . getOwnerDocument ( ) ) . thenReturn ( parentDocument ) ; when ( parentDocument . getDocumentReference ( ) ) . thenReturn ( documentReference ) ; when ( this . authorizationManager . hasAccess ( any ( ) , any ( ) , any ( ) ) ) . thenReturn ( true ) ; java . util . List < org . xwiki . component . wiki . WikiComponent > result = this . mocker . getComponentUnderTest ( ) . buildComponents ( baseObject ) ; "<AssertPlaceHolder>" ; } size ( ) { return groupNames . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , result . size ( ) ) |
executeKeepAliveTrue ( ) { org . powermock . api . mockito . PowerMockito . when ( httpClientInputs . getKeepAlive ( ) ) . thenReturn ( "true" ) ; java . util . Map < java . lang . String , java . lang . String > result1 = httpClientService . execute ( httpClientInputs ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( httpRequestBase , times ( 1 ) ) . releaseConnection ( ) ; } execute ( java . lang . String ) { java . util . Map < java . lang . String , java . lang . String > returnResult = new java . util . HashMap ( ) ; if ( io . cloudslang . content . utils . StringUtilities . isBlank ( array ) ) { return populateResult ( returnResult , new java . lang . Exception ( io . cloudslang . content . json . actions . ArraySize . NOT_A_VALID_JSON_ARRAY_MESSAGE ) ) ; } com . fasterxml . jackson . databind . JsonNode jsonNode ; try { com . fasterxml . jackson . databind . ObjectMapper mapper = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; jsonNode = mapper . readTree ( array ) ; } catch ( java . io . IOException exception ) { final java . lang . String value = "Invalid<sp>jsonObject<sp>provided!<sp>" + ( exception . getMessage ( ) ) ; return populateResult ( returnResult , value , exception ) ; } final java . lang . String result ; if ( jsonNode instanceof com . fasterxml . jackson . databind . node . ArrayNode ) { final com . fasterxml . jackson . databind . node . ArrayNode asJsonArray = ( ( com . fasterxml . jackson . databind . node . ArrayNode ) ( jsonNode ) ) ; result = java . lang . Integer . toString ( asJsonArray . size ( ) ) ; } else { return populateResult ( returnResult , new java . lang . Exception ( io . cloudslang . content . json . actions . ArraySize . NOT_A_VALID_JSON_ARRAY_MESSAGE ) ) ; } return populateResult ( returnResult , result , null ) ; } | org . junit . Assert . assertEquals ( result , result1 ) |
reset ( ) { c . setClient ( null ) ; c . reset ( ) ; "<AssertPlaceHolder>" ; } getClient ( ) { return client ; } | org . junit . Assert . assertNotNull ( c . getClient ( ) ) |
shouldConvertMapToStringKeysWithProvidedMap ( ) { final java . util . Map < java . lang . Class < ? extends java . lang . Number > , java . lang . String > map = new java . util . HashMap ( ) ; map . put ( uk . gov . gchq . gaffer . commonutil . Integer . class , "integer" ) ; map . put ( uk . gov . gchq . gaffer . commonutil . Double . class , "double" ) ; map . put ( uk . gov . gchq . gaffer . commonutil . Long . class , "long" ) ; final java . util . Map < java . lang . String , java . lang . String > result = new java . util . LinkedHashMap ( ) ; uk . gov . gchq . gaffer . commonutil . CollectionUtil . toMapWithStringKeys ( map , result ) ; final java . util . Map < java . lang . String , java . lang . String > expectedResult = new java . util . LinkedHashMap ( ) ; expectedResult . put ( uk . gov . gchq . gaffer . commonutil . Integer . class . getName ( ) , "integer" ) ; expectedResult . put ( uk . gov . gchq . gaffer . commonutil . Double . class . getName ( ) , "double" ) ; expectedResult . put ( uk . gov . gchq . gaffer . commonutil . Long . class . getName ( ) , "long" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( expectedResult , result ) |
testPostEntitiesWithPrimaryFilter ( ) { org . apache . hadoop . yarn . api . records . timeline . TimelineEntities entities = new org . apache . hadoop . yarn . api . records . timeline . TimelineEntities ( ) ; org . apache . hadoop . yarn . api . records . timeline . TimelineEntity entity = new org . apache . hadoop . yarn . api . records . timeline . TimelineEntity ( ) ; java . util . Map < java . lang . String , java . util . Set < java . lang . Object > > filters = new java . util . HashMap < java . lang . String , java . util . Set < java . lang . Object > > ( ) ; filters . put ( TimelineStore . SystemFilter . ENTITY_OWNER . toString ( ) , new java . util . HashSet < java . lang . Object > ( ) ) ; entity . setPrimaryFilters ( filters ) ; entity . setEntityId ( "test<sp>id<sp>6" ) ; entity . setEntityType ( "test<sp>type<sp>6" ) ; entity . setStartTime ( java . lang . System . currentTimeMillis ( ) ) ; entities . addEntity ( entity ) ; com . sun . jersey . api . client . WebResource r = resource ( ) ; com . sun . jersey . api . client . ClientResponse response = r . path ( "ws" ) . path ( "v1" ) . path ( "timeline" ) . queryParam ( "user.name" , "tester" ) . accept ( MediaType . APPLICATION_JSON ) . type ( MediaType . APPLICATION_JSON ) . post ( com . sun . jersey . api . client . ClientResponse . class , entities ) ; org . apache . hadoop . yarn . api . records . timeline . TimelinePutResponse putResposne = response . getEntity ( org . apache . hadoop . yarn . api . records . timeline . TimelinePutResponse . class ) ; "<AssertPlaceHolder>" ; } getErrors ( ) { return errors ; } | org . junit . Assert . assertEquals ( 0 , putResposne . getErrors ( ) . size ( ) ) |
pathsAreCopy ( ) { org . openscience . cdk . graph . Cycles cs = org . openscience . cdk . graph . Cycles . all ( makeAnthracene ( ) ) ; int [ ] [ ] org = cs . paths ( ) ; org [ 0 ] [ 0 ] = - 203 ; "<AssertPlaceHolder>" ; } not ( org . openscience . cdk . isomorphism . matchers . IQueryAtom ) { return new org . openscience . cdk . isomorphism . matchers . smarts . LogicalOperatorAtom . Negation ( expr . getBuilder ( ) , expr ) ; } | org . junit . Assert . assertThat ( org , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . not ( cs . paths ( ) ) ) ) |
testTooManyColumnsPriority ( ) { try { makeRuleSet ( ) ; makeRuleTable ( ) ; makeRow ( 11 , "C" , "C" , "A" , "PRIORITY" , "P" ) ; listener . finishSheet ( ) ; org . junit . Assert . fail ( "should<sp>have<sp>failed" ) ; } catch ( org . drools . template . parser . DecisionTableParseException e ) { java . lang . String badCell = org . drools . decisiontable . parser . RuleSheetParserUtil . rc2name ( 11 , 5 ) ; System . err . println ( e . getMessage ( ) ) ; "<AssertPlaceHolder>" ; } } getMessage ( ) { return this . message ; } | org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( badCell ) ) |
testReadComponentType ( ) { java . io . InputStream is = getClass ( ) . getResourceAsStream ( "CalculatorImpl.componentType" ) ; javax . xml . stream . XMLStreamReader reader = org . apache . tuscany . sca . interfacedef . java . xml . ReadTestCase . inputFactory . createXMLStreamReader ( is ) ; org . apache . tuscany . sca . assembly . ComponentType componentType = ( ( org . apache . tuscany . sca . assembly . ComponentType ) ( org . apache . tuscany . sca . interfacedef . java . xml . ReadTestCase . staxProcessor . read ( reader , org . apache . tuscany . sca . interfacedef . java . xml . ReadTestCase . context ) ) ) ; "<AssertPlaceHolder>" ; } read ( javax . xml . stream . XMLStreamReader , org . apache . tuscany . sca . contribution . processor . ProcessorContext ) { org . apache . tuscany . sca . interfacedef . java . JavaInterfaceContract javaInterfaceContract = javaFactory . createJavaInterfaceContract ( ) ; java . lang . String interfaceName = reader . getAttributeValue ( null , org . apache . tuscany . sca . interfacedef . java . xml . INTERFACE ) ; if ( interfaceName != null ) { org . apache . tuscany . sca . interfacedef . java . JavaInterface javaInterface = createJavaInterface ( interfaceName ) ; javaInterfaceContract . setInterface ( javaInterface ) ; } java . lang . String callbackInterfaceName = reader . getAttributeValue ( null , org . apache . tuscany . sca . interfacedef . java . xml . CALLBACK_INTERFACE ) ; if ( callbackInterfaceName != null ) { org . apache . tuscany . sca . interfacedef . java . JavaInterface javaCallbackInterface = createJavaInterface ( callbackInterfaceName ) ; javaInterfaceContract . setCallbackInterface ( javaCallbackInterface ) ; } java . lang . String remotable = reader . getAttributeValue ( null , org . apache . tuscany . sca . interfacedef . java . xml . REMOTABLE ) ; if ( remotable != null ) { javaInterfaceContract . getInterface ( ) . setRemotable ( java . lang . Boolean . parseBoolean ( remotable ) ) ; javaInterfaceContract . getInterface ( ) . setRemotableSetFromSCDL ( ) ; } policyProcessor . readPolicies ( javaInterfaceContract . getInterface ( ) , reader ) ; while ( reader . hasNext ( ) ) { if ( ( ( reader . next ( ) ) == ( javax . xml . stream . XMLStreamConstants . END_ELEMENT ) ) && ( org . apache . tuscany . sca . interfacedef . java . xml . INTERFACE_JAVA_QNAME . equals ( reader . getName ( ) ) ) ) { break ; } } return javaInterfaceContract ; } | org . junit . Assert . assertNotNull ( componentType ) |
testParseNegativeY ( ) { java . lang . String source = ( ( ( "{1" + ( getDecimalCharacter ( ) ) ) + "2323;<sp>-1" ) + ( getDecimalCharacter ( ) ) ) + "4343}" ; org . apache . commons . math3 . geometry . euclidean . twod . Vector2D expected = new org . apache . commons . math3 . geometry . euclidean . twod . Vector2D ( 1.2323 , ( - 1.4343 ) ) ; org . apache . commons . math3 . geometry . euclidean . twod . Vector2D actual = vector2DFormat . parse ( source ) ; "<AssertPlaceHolder>" ; } parse ( com . google . javascript . jscomp . AbstractCompiler ) { try { com . google . javascript . jscomp . JsAst . logger_ . fine ( ( "Parsing:<sp>" + ( sourceFile . getName ( ) ) ) ) ; com . google . javascript . jscomp . parsing . ParserRunner . ParseResult result = com . google . javascript . jscomp . parsing . ParserRunner . parse ( sourceFile , sourceFile . getCode ( ) , compiler . getParserConfig ( ) , compiler . getDefaultErrorReporter ( ) , com . google . javascript . jscomp . JsAst . logger_ ) ; root = result . ast ; compiler . setOldParseTree ( sourceFile . getName ( ) , result . oldAst ) ; } catch ( java . io . IOException e ) { compiler . report ( com . google . javascript . jscomp . JSError . make ( AbstractCompiler . READ_ERROR , sourceFile . getName ( ) ) ) ; } if ( ( ( root ) == null ) || ( compiler . hasHaltingErrors ( ) ) ) { root = com . google . javascript . rhino . IR . script ( ) ; } else { compiler . prepareAst ( root ) ; } root . setStaticSourceFile ( sourceFile ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testCompareToGreaterThan ( ) { au . gov . ga . earthsci . core . temporal . timescale . BasicTimeScaleLevel l1 = new au . gov . ga . earthsci . core . temporal . timescale . BasicTimeScaleLevel ( "name1" , "description1" , java . math . BigInteger . TEN , 2 ) ; au . gov . ga . earthsci . core . temporal . timescale . BasicTimeScaleLevel l2 = new au . gov . ga . earthsci . core . temporal . timescale . BasicTimeScaleLevel ( "name2" , "description2" , java . math . BigInteger . ONE , 1 ) ; "<AssertPlaceHolder>" ; } compareTo ( au . gov . ga . earthsci . common . ui . color . ColorMapEditor$Marker ) { return ( o . zIndex ) - ( zIndex ) ; } | org . junit . Assert . assertTrue ( ( ( l1 . compareTo ( l2 ) ) > 0 ) ) |
testMatches ( ) { com . fasterxml . jackson . databind . node . BooleanNode booleanNode = jsonNodeFactory . booleanNode ( true ) ; nl . fd . hamcrest . jackson . IsJsonBoolean matcher = new nl . fd . hamcrest . jackson . IsJsonBoolean ( true ) ; boolean matches = matcher . matches ( booleanNode ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( matches ) |
testConvert ( ) { org . opencb . opencga . storage . core . StoragePipelineResult storagePipelineResult = runETL ( variantStorageEngine , smallInputUri , newOutputUri ( ) , new org . opencb . commons . datastore . core . ObjectMap ( VariantStorageEngine . Options . ISOLATE_FILE_FROM_STUDY_CONFIGURATION . key ( ) , true ) , true , true , false ) ; org . opencb . biodata . models . variant . VariantFileMetadata expectedFileMetadata = variantStorageEngine . getVariantReaderUtils ( ) . readVariantFileMetadata ( storagePipelineResult . getTransformResult ( ) ) ; java . io . InputStream resource = new java . util . zip . GZIPInputStream ( getClass ( ) . getResourceAsStream ( "/variant-test-file.vcf.gz.file_legacy.json.gz" ) ) ; org . opencb . biodata . models . variant . avro . legacy . VariantSource legacy = new com . fasterxml . jackson . databind . ObjectMapper ( ) . readValue ( resource , org . opencb . biodata . models . variant . avro . legacy . VariantSource . class ) ; org . opencb . biodata . models . variant . VariantFileMetadata convertedFileMetadata = new org . opencb . opencga . storage . core . metadata . VariantSourceToVariantFileMetadataConverter ( ) . convert ( legacy ) ; expectedFileMetadata . getStats ( ) . setStdDevQuality ( 0 ) ; "<AssertPlaceHolder>" ; } getStats ( ) { return stats ; } | org . junit . Assert . assertEquals ( expectedFileMetadata , convertedFileMetadata ) |
createFileSRTestSrAlreadyConfigured ( ) { com . xensource . xenapi . SR srMockRetrievedMethod = org . mockito . Mockito . mock ( com . xensource . xenapi . SR . class ) ; com . xensource . xenapi . SR srMockCreateMethod = org . mockito . Mockito . mock ( com . xensource . xenapi . SR . class ) ; org . mockito . Mockito . doReturn ( srMockRetrievedMethod ) . when ( xenserver625StorageProcessor ) . retrieveAlreadyConfiguredSrWithoutException ( connectionMock , pathMock ) ; org . mockito . Mockito . doReturn ( srMockCreateMethod ) . when ( xenserver625StorageProcessor ) . createNewFileSr ( connectionMock , pathMock ) ; com . xensource . xenapi . SR methodCreateFileSrResult = xenserver625StorageProcessor . createFileSR ( connectionMock , pathMock ) ; org . mockito . InOrder inOrder = org . mockito . Mockito . inOrder ( xenserver625StorageProcessor ) ; inOrder . verify ( xenserver625StorageProcessor , times ( 1 ) ) . retrieveAlreadyConfiguredSrWithoutException ( connectionMock , pathMock ) ; inOrder . verify ( xenserver625StorageProcessor , times ( 0 ) ) . createNewFileSr ( connectionMock , pathMock ) ; "<AssertPlaceHolder>" ; } createNewFileSr ( com . xensource . xenapi . Connection , java . lang . String ) { java . lang . String hostUuid = hypervisorResource . getHost ( ) . getUuid ( ) ; com . cloud . hypervisor . xenserver . resource . Xenserver625StorageProcessor . s_logger . debug ( java . lang . String . format ( "Creating<sp>file<sp>SR<sp>for<sp>path<sp>[%s]<sp>on<sp>host<sp>[%s]" , srPath , this . hypervisorResource . _host . getUuid ( ) ) ) ; com . xensource . xenapi . SR sr = null ; com . xensource . xenapi . PBD pbd = null ; try { com . xensource . xenapi . Host host = com . xensource . xenapi . Host . getByUuid ( conn , hostUuid ) ; java . lang . String srUuid = java . util . UUID . nameUUIDFromBytes ( srPath . getBytes ( ) ) . toString ( ) ; java . util . Map < java . lang . String , java . lang . String > smConfig = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; sr = com . xensource . xenapi . SR . introduce ( conn , srUuid , srPath , srPath , "file" , "file" , false , smConfig ) ; com . xensource . xenapi . PBD . Record record = new com . xensource . xenapi . PBD . Record ( ) ; record . host = host ; record . SR = sr ; smConfig . put ( "location" , srPath ) ; record . deviceConfig = smConfig ; pbd = com . xensource . xenapi . PBD . create ( conn , record ) ; pbd . plug ( conn ) ; sr . scan ( conn ) ; return sr ; } catch ( com . xensource . xenapi . Types . XenAPIException | org . apache . xmlrpc . XmlRpcException e ) { if ( e instanceof com . xensource . xenapi . Types . InternalError ) { java . lang . String expectedDuplicatedFileSrErrorMessage = "Db_exn.Uniqueness_constraint_violation" ; com . xensource . xenapi . Types . InternalError internalErrorException = ( ( com . xensource . xenapi . Types . InternalError ) ( e ) ) ; if ( org . apache . commons . lang . StringUtils . contains ( internalErrorException . message , expectedDuplicatedFileSrErrorMessage ) ) { com . cloud . hypervisor . xenserver . resource . Xenserver625StorageProcessor . s_logger . debug ( java . lang . String . format ( "It<sp>seems<sp>that<sp>we<sp>have<sp>hit<sp>a<sp>race<sp>condition<sp>case<sp>here<sp>while<sp>creating<sp>file<sp>SR<sp>for<sp>[%s].<sp>Instead<sp>of<sp>creating<sp>one,<sp>we<sp>will<sp>reuse<sp>the<sp>one<sp>that<sp>already<sp>exist<sp>in<sp>the<sp>XenServer<sp>pool." , srPath ) ) ; return retrieveAlreadyConfiguredSrWithoutException ( conn , srPath ) ; } } removeSrAndPbdIfPossible ( conn , sr , pbd ) ; com . cloud . hypervisor . xenserver . resource . Xenserver625StorageProcessor . s_logger . debug ( java . lang . String . format ( "Could<sp>not<sp>create<sp>file<sp>SR<sp>[%s]<sp>on<sp>host<sp>[%s]." , srPath , hostUuid ) , e ) ; return null ; } } | org . junit . Assert . assertEquals ( srMockRetrievedMethod , methodCreateFileSrResult ) |
testGragg ( ) { double tEnd = test ( 2 ) ; "<AssertPlaceHolder>" ; } test ( int ) { double e = 1.0E-15 ; org . apache . commons . math4 . ode . FirstOrderIntegrator integrator = new org . apache . commons . math4 . ode . nonstiff . DormandPrince853Integrator ( e , 100.0 , 1.0E-7 , 1.0E-7 ) ; org . apache . commons . math4 . analysis . solvers . BaseSecantSolver rootSolver = new org . apache . commons . math4 . analysis . solvers . PegasusSolver ( e , e ) ; org . apache . commons . math4 . ode . events . EventHandler evt1 = new org . apache . commons . math4 . ode . events . OverlappingEventsTest . Event ( 0 , eventType ) ; org . apache . commons . math4 . ode . events . EventHandler evt2 = new org . apache . commons . math4 . ode . events . OverlappingEventsTest . Event ( 1 , eventType ) ; integrator . addEventHandler ( evt1 , 0.1 , e , 999 , rootSolver ) ; integrator . addEventHandler ( evt2 , 0.1 , e , 999 , rootSolver ) ; double t = 0.0 ; double tEnd = 10.0 ; double [ ] y = new double [ ] { 0.0 , 0.0 } ; java . util . List < java . lang . Double > events1 = new java . util . ArrayList ( ) ; java . util . List < java . lang . Double > events2 = new java . util . ArrayList ( ) ; while ( t < tEnd ) { t = integrator . integrate ( this , t , y , tEnd , y ) ; if ( ( y [ 0 ] ) >= 1.0 ) { y [ 0 ] = 0.0 ; events1 . add ( t ) ; } if ( ( y [ 1 ] ) >= 1.0 ) { y [ 1 ] = 0.0 ; events2 . add ( t ) ; } } org . junit . Assert . assertEquals ( org . apache . commons . math4 . ode . events . OverlappingEventsTest . EVENT_TIMES1 . length , events1 . size ( ) ) ; org . junit . Assert . assertEquals ( org . apache . commons . math4 . ode . events . OverlappingEventsTest . EVENT_TIMES2 . length , events2 . size ( ) ) ; for ( int i = 0 ; i < ( org . apache . commons . math4 . ode . events . OverlappingEventsTest . EVENT_TIMES1 . length ) ; i ++ ) { org . junit . Assert . assertEquals ( org . apache . commons . math4 . ode . events . OverlappingEventsTest . EVENT_TIMES1 [ i ] , events1 . get ( i ) , 1.0E-7 ) ; } for ( int i = 0 ; i < ( org . apache . commons . math4 . ode . events . OverlappingEventsTest . EVENT_TIMES2 . length ) ; i ++ ) { org . junit . Assert . assertEquals ( org . apache . commons . math4 . ode . events . OverlappingEventsTest . EVENT_TIMES2 [ i ] , events2 . get ( i ) , 1.0E-7 ) ; } | org . junit . Assert . assertEquals ( 10.0 , tEnd , 1.0E-7 ) |
canModifyProperty ( ) { final org . apache . isis . core . metamodel . consent . Consent visibilityConsent = new org . apache . isis . core . metamodel . consent . Allow ( new org . apache . isis . core . metamodel . consent . InteractionResult ( new org . apache . isis . applib . events . PropertyVisibilityEvent ( employeeDO , mockPasswordIdentifier ) ) ) ; final org . apache . isis . core . metamodel . consent . Consent usabilityConsent = new org . apache . isis . core . metamodel . consent . Allow ( new org . apache . isis . core . metamodel . consent . InteractionResult ( new org . apache . isis . applib . events . PropertyUsabilityEvent ( employeeDO , mockPasswordIdentifier ) ) ) ; final org . apache . isis . core . metamodel . consent . Consent validityConsent = new org . apache . isis . core . metamodel . consent . Allow ( new org . apache . isis . core . metamodel . consent . InteractionResult ( new org . apache . isis . applib . events . PropertyModifyEvent ( employeeDO , mockPasswordIdentifier , passwordValue ) ) ) ; context . checking ( new org . jmock . Expectations ( ) { { allowing ( mockPasswordMember ) . isVisible ( mockEmployeeAdapter , InteractionInitiatedBy . USER , Where . ANYWHERE ) ; will ( returnValue ( visibilityConsent ) ) ; allowing ( mockPasswordMember ) . isUsable ( mockEmployeeAdapter , InteractionInitiatedBy . USER , Where . ANYWHERE ) ; will ( returnValue ( usabilityConsent ) ) ; allowing ( mockPasswordMember ) . isAssociationValid ( mockEmployeeAdapter , mockPasswordAdapter , InteractionInitiatedBy . USER ) ; will ( returnValue ( validityConsent ) ) ; } } ) ; facets = java . util . Arrays . asList ( ( ( org . apache . isis . core . metamodel . facetapi . Facet ) ( new org . apache . isis . core . metamodel . facets . properties . update . modify . PropertySetterFacetViaSetterMethod ( setPasswordMethod , mockPasswordMember ) ) ) ) ; context . checking ( new org . jmock . Expectations ( ) { { allowing ( mockPasswordMember ) . getFacets ( with ( any ( org . apache . isis . applib . filter . Filter . class ) ) ) ; will ( returnValue ( facets ) ) ; oneOf ( mockPasswordMember ) . set ( mockEmployeeAdapter , mockPasswordAdapter , InteractionInitiatedBy . USER ) ; } } ) ; employeeWO . setPassword ( passwordValue ) ; facets = java . util . Arrays . asList ( ( ( org . apache . isis . core . metamodel . facetapi . Facet ) ( new org . apache . isis . core . metamodel . facets . properties . accessor . PropertyAccessorFacetViaAccessor ( mockOnType , getPasswordMethod , mockPasswordMember , mockDeploymentCategoryProvider . getDeploymentCategory ( ) , mockConfiguration , mockSpecificationLoader , mockAuthenticationSessionProvider , mockAdapterManager ) ) ) ) ; context . checking ( new org . jmock . Expectations ( ) { { allowing ( mockPasswordMember ) . getFacets ( with ( any ( org . apache . isis . applib . filter . Filter . class ) ) ) ; will ( returnValue ( facets ) ) ; oneOf ( mockPasswordMember ) . get ( mockEmployeeAdapter , InteractionInitiatedBy . USER ) ; will ( returnValue ( mockPasswordAdapter ) ) ; } } ) ; "<AssertPlaceHolder>" ; } getPassword ( ) { return password ; } | org . junit . Assert . assertThat ( employeeWO . getPassword ( ) , org . hamcrest . CoreMatchers . is ( passwordValue ) ) |
testGetTileMatrixSetNotExists ( ) { org . deegree . tile . TileMatrixSet matrixSet = client . getTileMatrixSet ( "Satellite_PROVO" ) ; "<AssertPlaceHolder>" ; } getTileMatrixSet ( java . lang . String ) { java . util . List < org . deegree . tile . TileMatrixSet > tileMatrixSets = getTileMatrixSets ( ) ; for ( org . deegree . tile . TileMatrixSet tileMatrixSet : tileMatrixSets ) { if ( tileMatrixSet . getIdentifier ( ) . equals ( tileMatrixSetId ) ) { return tileMatrixSet ; } } return null ; } | org . junit . Assert . assertNull ( matrixSet ) |
testRequestWithInvalidStateQueries ( ) { org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest request = org . apache . hadoop . yarn . server . resourcemanager . webapp . ApplicationsRequestBuilder . create ( ) . withStatesQuery ( com . google . common . collect . Sets . newHashSet ( "a1" , "a2" , "" ) ) . build ( ) ; org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest expectedRequest = getDefaultRequest ( ) ; "<AssertPlaceHolder>" ; } getDefaultRequest ( ) { org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest req = org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest . newInstance ( ) ; req . setStartRange ( 0 , Long . MAX_VALUE ) ; req . setFinishRange ( 0 , Long . MAX_VALUE ) ; return req ; } | org . junit . Assert . assertEquals ( expectedRequest , request ) |
testEdges ( ) { java . util . Set edges = com . google . common . collect . Sets . newHashSet ( graph . edges ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; } | org . junit . Assert . assertEquals ( ( ( ( size ) * ( ( size ) - 1 ) ) / 2 ) , edges . size ( ) ) |
valueOf ( ) { "<AssertPlaceHolder>" ; } valueOf ( joptsimple . OptionSpec ) { requireNonNull ( option ) ; java . util . List < V > values = valuesOf ( option ) ; switch ( values . size ( ) ) { case 0 : return null ; case 1 : return values . get ( 0 ) ; default : throw new joptsimple . MultipleArgumentsForOptionException ( option ) ; } } | org . junit . Assert . assertNull ( empty . valueOf ( "a" ) ) |
testHistoricDecisionInputInstanceBinary ( ) { testRule . deploy ( org . camunda . bpm . engine . test . api . resources . HistoryByteArrayTest . DECISION_PROCESS , org . camunda . bpm . engine . test . api . resources . HistoryByteArrayTest . DECISION_SINGLE_OUTPUT_DMN ) ; startProcessInstanceAndEvaluateDecision ( new org . camunda . bpm . engine . test . api . variables . JavaSerializable ( "foo" ) ) ; org . camunda . bpm . engine . history . HistoricDecisionInstance historicDecisionInstance = engineRule . getHistoryService ( ) . createHistoricDecisionInstanceQuery ( ) . includeInputs ( ) . singleResult ( ) ; java . util . List < org . camunda . bpm . engine . history . HistoricDecisionInputInstance > inputInstances = historicDecisionInstance . getInputs ( ) ; "<AssertPlaceHolder>" ; java . lang . String byteArrayValueId = ( ( org . camunda . bpm . engine . impl . history . event . HistoricDecisionInputInstanceEntity ) ( inputInstances . get ( 0 ) ) ) . getByteArrayValueId ( ) ; org . camunda . bpm . engine . impl . persistence . entity . ByteArrayEntity byteArrayEntity = configuration . getCommandExecutorTxRequired ( ) . execute ( new org . camunda . bpm . engine . test . api . resources . GetByteArrayCommand ( byteArrayValueId ) ) ; checkBinary ( byteArrayEntity ) ; } size ( ) { return ( ( ( historicProcessInstanceIds . size ( ) ) + ( historicDecisionInstanceIds . size ( ) ) ) + ( historicCaseInstanceIds . size ( ) ) ) + ( historicBatchIds . size ( ) ) ; } | org . junit . Assert . assertEquals ( 1 , inputInstances . size ( ) ) |
sourceRunnerTemplateFileTest ( ) { propertyManager . setSourceRunnerTemplateFile ( "myTemplate" ) ; "<AssertPlaceHolder>" ; } getSourceRunnerTemplateFile ( ) { return sourceRunnerTemplateFile ; } | org . junit . Assert . assertThat ( propertyManager . getSourceRunnerTemplateFile ( ) , org . hamcrest . core . Is . is ( "myTemplate" ) ) |
testOnAppLauncherAddEvent ( ) { final java . lang . String appName = "appName" ; final java . lang . String url = "url" ; final java . lang . String css = "fa" ; presenter . onAppLauncherAddEvent ( new org . kie . workbench . common . widgets . client . popups . launcher . events . AppLauncherAddEvent ( appName , url , css ) ) ; verify ( view ) . addAppLauncher ( appName , url , css ) ; verify ( updatedEvent ) . fire ( any ( org . kie . workbench . common . widgets . client . popups . launcher . events . AppLauncherUpdatedEvent . class ) ) ; "<AssertPlaceHolder>" ; } isAppLauncherEmpty ( ) { return appLauncherAddEvents . isEmpty ( ) ; } | org . junit . Assert . assertFalse ( presenter . isAppLauncherEmpty ( ) ) |
textRawFullTextTest ( ) { pl . edu . icm . cermine . InputStream testStream = pl . edu . icm . cermine . ContentExtractorTest . class . getResourceAsStream ( pl . edu . icm . cermine . ContentExtractorTest . TEST_PDF_2 ) ; java . lang . String testContent ; try { extractor . setPDF ( testStream ) ; testContent = extractor . getRawFullText ( ) ; } finally { testStream . close ( ) ; } pl . edu . icm . cermine . InputStream expStream = pl . edu . icm . cermine . ContentExtractorTest . class . getResourceAsStream ( pl . edu . icm . cermine . ContentExtractorTest . EXP_TEXT_2 ) ; pl . edu . icm . cermine . BufferedReader reader = null ; java . lang . StringBuilder expectedContent = new java . lang . StringBuilder ( ) ; try { reader = new pl . edu . icm . cermine . BufferedReader ( new pl . edu . icm . cermine . InputStreamReader ( expStream , "UTF-8" ) ) ; java . lang . String line ; while ( ( line = reader . readLine ( ) ) != null ) { expectedContent . append ( line ) ; expectedContent . append ( "\n" ) ; } } finally { try { expStream . close ( ) ; } finally { if ( reader != null ) { reader . close ( ) ; } } } "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( "Result{" + "totalOrig=" ) + ( totalOrig ) ) + ",<sp>totalExtr=" ) + ( totalExtr ) ) + ",<sp>success=" ) + ( success ) ) + '}' ; } | org . junit . Assert . assertEquals ( testContent . trim ( ) , expectedContent . toString ( ) . trim ( ) ) |
trimTest ( ) { org . roaringbitmap . RoaringBitmap rb = new org . roaringbitmap . RoaringBitmap ( ) ; for ( int i = 0 ; i < 4000 ; i ++ ) { rb . add ( ( ( 1 << 16 ) * i ) ) ; } rb . trim ( ) ; int wastedBytes = 0 ; final int javaReferenceSize = 4 ; org . roaringbitmap . RoaringArray ra = rb . highLowContainer ; wastedBytes += ( Short . BYTES ) * ( ( ra . keys . length ) - ( ra . size ) ) ; wastedBytes += javaReferenceSize * ( ( ra . values . length ) - ( ra . size ) ) ; org . roaringbitmap . ContainerPointer cp = ra . getContainerPointer ( ) ; while ( ( cp . getContainer ( ) ) != null ) { if ( cp . isBitmapContainer ( ) ) { } else if ( cp . isRunContainer ( ) ) { } else { org . roaringbitmap . ArrayContainer ac = ( ( org . roaringbitmap . ArrayContainer ) ( cp . getContainer ( ) ) ) ; wastedBytes += ( Short . BYTES ) * ( ( ac . content . length ) - ( ac . cardinality ) ) ; } cp . advance ( ) ; } "<AssertPlaceHolder>" ; } advance ( ) { ++ ( k ) ; } | org . junit . Assert . assertEquals ( 0 , wastedBytes ) |
testCorrelatedSubqueryCaching1 ( ) { java . lang . String sql = "Select<sp>(select<sp>e2<sp>FROM<sp>pm2.g1<sp>WHERE<sp>pm1.g1.e3<sp>=<sp>pm2.g1.e3<sp>limit<sp>1),<sp>(select<sp>e2<sp>FROM<sp>pm2.g1<sp>WHERE<sp>pm1.g1.e3<sp>=<sp>pm2.g1.e3<sp>limit<sp>1)<sp>from<sp>pm1.g1<sp>order<sp>by<sp>e1<sp>limit<sp>1" ; org . teiid . query . processor . List [ ] expected = new org . teiid . query . processor . List [ ] { org . teiid . query . processor . Arrays . asList ( 0 , 0 ) } ; org . teiid . query . processor . FakeDataManager dataManager = new org . teiid . query . processor . FakeDataManager ( ) ; org . teiid . query . processor . TestProcessor . sampleData1 ( dataManager ) ; org . teiid . query . processor . ProcessorPlan plan = org . teiid . query . processor . TestProcessor . helpGetPlan ( sql , org . teiid . query . unittest . RealMetadataFactory . example1Cached ( ) ) ; org . teiid . query . processor . TestProcessor . doProcess ( plan , dataManager , expected , org . teiid . query . processor . TestProcessor . createCommandContext ( ) ) ; "<AssertPlaceHolder>" ; } getQueries ( ) { return this . queries ; } | org . junit . Assert . assertEquals ( 2 , dataManager . getQueries ( ) . size ( ) ) |
colNeValue ( ) { com . foundationdb . sql . optimizer . plan . ConstantExpression value = constant ( "joe" ) ; com . foundationdb . sql . optimizer . plan . ConditionExpression compare = compare ( firstName , Comparison . NE , value ) ; com . foundationdb . sql . optimizer . rule . range . ColumnRanges expected = columnRanges ( firstName , compare , segment ( nullExclusive ( "joe" ) , exclusive ( "joe" ) ) , segment ( exclusive ( "joe" ) , RangeEndpoint . UPPER_WILD ) ) ; "<AssertPlaceHolder>" ; } rangeAtNode ( com . foundationdb . sql . optimizer . plan . ConditionExpression ) { if ( node instanceof com . foundationdb . sql . optimizer . plan . ComparisonCondition ) { com . foundationdb . sql . optimizer . plan . ComparisonCondition comparisonCondition = ( ( com . foundationdb . sql . optimizer . plan . ComparisonCondition ) ( node ) ) ; return com . foundationdb . sql . optimizer . rule . range . ColumnRanges . comparisonToRange ( comparisonCondition ) ; } else if ( node instanceof com . foundationdb . sql . optimizer . plan . LogicalFunctionCondition ) { com . foundationdb . sql . optimizer . plan . LogicalFunctionCondition condition = ( ( com . foundationdb . sql . optimizer . plan . LogicalFunctionCondition ) ( node ) ) ; if ( ( condition . getOperands ( ) . size ( ) ) != 2 ) return null ; com . foundationdb . sql . optimizer . rule . range . ColumnRanges leftRange = com . foundationdb . sql . optimizer . rule . range . ColumnRanges . rangeAtNode ( condition . getLeft ( ) ) ; com . foundationdb . sql . optimizer . rule . range . ColumnRanges rightRange = com . foundationdb . sql . optimizer . rule . range . ColumnRanges . rangeAtNode ( condition . getRight ( ) ) ; if ( ( leftRange != null ) && ( rightRange != null ) ) { java . util . List < com . foundationdb . sql . optimizer . rule . range . RangeSegment > combinedSegments = com . foundationdb . sql . optimizer . rule . range . ColumnRanges . combineBool ( leftRange , rightRange , condition . getFunction ( ) ) ; if ( combinedSegments != null ) { return new com . foundationdb . sql . optimizer . rule . range . ColumnRanges ( leftRange . getColumnExpression ( ) , condition , combinedSegments ) ; } } } else if ( node instanceof com . foundationdb . sql . optimizer . plan . FunctionCondition ) { com . foundationdb . sql . optimizer . plan . FunctionCondition condition = ( ( com . foundationdb . sql . optimizer . plan . FunctionCondition ) ( node ) ) ; if ( "isNull" . equals ( condition . getFunction ( ) ) ) { if ( ( condition . getOperands ( ) . size ( ) ) == 1 ) { com . foundationdb . sql . optimizer . plan . ExpressionNode operand = condition . getOperands ( ) . get ( 0 ) ; if ( operand instanceof com . foundationdb . sql . optimizer . plan . ColumnExpression ) { com . foundationdb . sql . optimizer . plan . ColumnExpression operandColumn = ( ( com . foundationdb . sql . optimizer . plan . ColumnExpression ) ( operand ) ) ; return new com . foundationdb . sql . optimizer . rule . range . ColumnRanges ( operandColumn , condition , java . util . Collections . singletonList ( com . foundationdb . sql . optimizer . rule . range . RangeSegment . onlyNull ( operandColumn ) ) ) ; } } } } else if ( node instanceof com . foundationdb . sql . optimizer . plan . InListCondition ) { com . foundationdb . sql . optimizer . plan . InListCondition inListCondition = ( ( com . foundationdb . sql . optimizer . plan . InListCondition ) ( node ) ) ; return com . foundationdb . sql . optimizer . rule . range . ColumnRanges . inListToRange ( inListCondition ) ; } return null ; } | org . junit . Assert . assertEquals ( expected , com . foundationdb . sql . optimizer . rule . range . ColumnRanges . rangeAtNode ( compare ) ) |
testGetValueSet ( ) { new mockit . Expectations ( ) { { request . getHeaders ( "h1" ) ; result = java . util . Collections . enumeration ( java . util . Arrays . asList ( "h1v" ) ) ; } } ; org . apache . servicecomb . common . rest . codec . param . HeaderProcessorCreator . HeaderProcessor processor = new org . apache . servicecomb . common . rest . codec . param . HeaderProcessorCreator . HeaderProcessor ( "h1" , com . fasterxml . jackson . databind . type . TypeFactory . defaultInstance ( ) . constructCollectionType ( java . util . Set . class , java . lang . String . class ) , null , true ) ; java . lang . Object value = processor . getValue ( request ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { return false ; } | org . junit . Assert . assertThat ( ( ( java . util . Set < java . lang . String > ) ( value ) ) , org . hamcrest . Matchers . contains ( "h1v" ) ) |
testCreate_L1_MSS_reproc ( ) { java . io . File testFile = new java . io . File ( getClass ( ) . getResource ( "test_L1_MSS_MTL.txt" ) . getFile ( ) ) ; org . esa . s3tbx . dataio . landsat . geotiff . LandsatMetadata landsatMetadata = org . esa . s3tbx . dataio . landsat . geotiff . LandsatMetadataFactory . create ( testFile ) ; "<AssertPlaceHolder>" ; } create ( java . io . File ) { org . esa . s3tbx . dataio . landsat . geotiff . LandsatLegacyMetadata landsatMetadata = new org . esa . s3tbx . dataio . landsat . geotiff . LandsatLegacyMetadata ( new java . io . FileReader ( mtlFile ) ) ; if ( landsatMetadata . isLegacyFormat ( ) ) { if ( ( landsatMetadata . isLandsatTM ( ) ) || ( landsatMetadata . isLandsatETM_Plus ( ) ) ) { return landsatMetadata ; } else { throw new org . esa . snap . core . dataio . ProductIOException ( "Product<sp>is<sp>of<sp>a<sp>legacy<sp>landsat<sp>format,<sp>not<sp>a<sp>legacy<sp>Landsat5<sp>or<sp>Landsat7<sp>ETM+<sp>product." ) ; } } else { java . io . BufferedReader reader = null ; try { java . io . FileReader fileReader = new java . io . FileReader ( mtlFile ) ; reader = new java . io . BufferedReader ( fileReader ) ; java . lang . String line = reader . readLine ( ) ; while ( line != null ) { if ( line . contains ( "SPACECRAFT_ID" ) ) { if ( line . contains ( "LANDSAT_8" ) ) { return new org . esa . s3tbx . dataio . landsat . geotiff . Landsat8Metadata ( new java . io . FileReader ( mtlFile ) ) ; } else { return new org . esa . s3tbx . dataio . landsat . geotiff . LandsatReprocessedMetadata ( new java . io . FileReader ( mtlFile ) ) ; } } line = reader . readLine ( ) ; } } finally { if ( reader != null ) { reader . close ( ) ; } } throw new java . lang . IllegalStateException ( ( ( "File<sp>'" + mtlFile ) + "'<sp>does<sp>not<sp>contain<sp>spacecraft<sp>information.<sp>(Field<sp>'SPACECRAFT_ID'<sp>missing)" ) ) ; } } | org . junit . Assert . assertTrue ( ( landsatMetadata instanceof org . esa . s3tbx . dataio . landsat . geotiff . LandsatReprocessedMetadata ) ) |
asyncUpgradeSubscription ( ) { when ( service . asyncUpgradeSubscription ( anyString ( ) , anyString ( ) , anyString ( ) , anyListOf ( org . oscm . provisioning . data . ServiceParameter . class ) , anyListOf ( org . oscm . provisioning . data . ServiceAttribute . class ) , any ( org . oscm . provisioning . data . User . class ) ) ) . thenReturn ( baseResult ) ; org . oscm . provisioning . data . BaseResult result = adapter . asyncUpgradeSubscription ( org . oscm . applicationservice . provisioning . adapter . v1_0 . ProvisioningServiceAdapterV1_0Test . ASYNC , org . oscm . applicationservice . provisioning . adapter . v1_0 . ProvisioningServiceAdapterV1_0Test . SUBSCRIPTIONID , org . oscm . applicationservice . provisioning . adapter . v1_0 . ProvisioningServiceAdapterV1_0Test . REFERENCEID , params , attr , null ) ; "<AssertPlaceHolder>" ; verify ( service ) . asyncUpgradeSubscription ( same ( org . oscm . applicationservice . provisioning . adapter . v1_0 . ProvisioningServiceAdapterV1_0Test . ASYNC ) , same ( org . oscm . applicationservice . provisioning . adapter . v1_0 . ProvisioningServiceAdapterV1_0Test . SUBSCRIPTIONID ) , same ( org . oscm . applicationservice . provisioning . adapter . v1_0 . ProvisioningServiceAdapterV1_0Test . REFERENCEID ) , same ( params ) , same ( attr ) , any ( org . oscm . provisioning . data . User . class ) ) ; verifyZeroInteractions ( params ) ; } getDesc ( ) { return localDesc ; } | org . junit . Assert . assertEquals ( org . oscm . applicationservice . provisioning . adapter . v1_0 . ProvisioningServiceAdapterV1_0Test . ASYNC , result . getDesc ( ) ) |
testQueryByPkWithEntityNoId ( ) { com . ctrip . platform . dal . dao . shard . ClientTestModel pk = new com . ctrip . platform . dal . dao . shard . ClientTestModel ( ) ; com . ctrip . platform . dal . dao . shard . ClientTestModel model = null ; for ( int i = 0 ; i < ( com . ctrip . platform . dal . dao . shard . BaseDalTabelDaoShardByTableTest . mod ) ; i ++ ) { pk = new com . ctrip . platform . dal . dao . shard . ClientTestModel ( ) ; pk . setTableIndex ( i ) ; if ( ( i % 2 ) == 0 ) model = com . ctrip . platform . dal . dao . shard . BaseDalTabelDaoShardByTableTest . dao . queryByPk ( pk , new com . ctrip . platform . dal . dao . shard . DalHints ( ) ) ; else model = com . ctrip . platform . dal . dao . shard . BaseDalTabelDaoShardByTableTest . dao . queryByPk ( pk , new com . ctrip . platform . dal . dao . shard . DalHints ( ) ) ; "<AssertPlaceHolder>" ; } } queryByPk ( T , com . ctrip . platform . dal . dao . DalHints ) { com . ctrip . platform . dal . dao . StatementParameters parameters = new com . ctrip . platform . dal . dao . StatementParameters ( ) ; addParameters ( parameters , parser . getPrimaryKeys ( pk ) ) ; return queryObject ( new com . ctrip . platform . dal . dao . SelectSqlBuilder ( ) . where ( pkSql ) . with ( parameters ) . requireSingle ( ) . nullable ( ) , hints . setFields ( parser . getFields ( pk ) ) ) ; } | org . junit . Assert . assertNull ( model ) |
testProcessContentLinkWithTitleAsLastParameterDoNotChange ( ) { java . lang . String content = "This<sp>is<sp>a<sp>test<sp><a<sp>href=\"wiki/get_page_attachment?p_l_id=1234" + "&title=ORIGINAL_NAME\"/>" ; content = _wikiPageRenameHTMLContentProcessor . processContent ( 0 , "ORIGINAL_NAME" , "FINAL_NAME" , content ) ; "<AssertPlaceHolder>" ; } processContent ( long , java . lang . String , java . lang . String , java . lang . String ) { return runRegexps ( originalContent , originalTitle , newTitle ) ; } | org . junit . Assert . assertEquals ( ( "This<sp>is<sp>a<sp>test<sp><a<sp>href=\"wiki/get_page_attachment?p_l_id=1234" + "&title=ORIGINAL_NAME\"/>" ) , content ) |
shouldDisableCleanUpAtStart ( ) { final java . util . UUID stepMarker = java . util . UUID . randomUUID ( ) ; final org . talend . dataprep . maintenance . preparation . StepMarker marker = new org . talend . dataprep . maintenance . preparation . PreparationStepMarker ( ) ; final org . talend . dataprep . preparation . store . PreparationRepository repository = mock ( org . talend . dataprep . preparation . store . PreparationRepository . class ) ; when ( repository . exist ( eq ( org . talend . dataprep . api . preparation . Preparation . class ) , any ( ) ) ) . thenReturn ( true ) ; final org . talend . dataprep . maintenance . preparation . StepMarker . Result result = marker . mark ( repository , stepMarker ) ; "<AssertPlaceHolder>" ; } mark ( org . talend . dataprep . preparation . store . PreparationRepository , java . util . UUID ) { if ( repository . exist ( org . talend . dataprep . api . preparation . Preparation . class , recentlyModified ( ) ) ) { org . talend . dataprep . maintenance . preparation . PreparationStepMarker . LOGGER . info ( "Not<sp>running<sp>clean<sp>up<sp>(at<sp>least<sp>a<sp>preparation<sp>modified<sp>within<sp>last<sp>hour)." ) ; logRecentlyModified ( repository ) ; return Result . INTERRUPTED ; } final java . util . concurrent . atomic . AtomicBoolean interrupted = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; repository . list ( org . talend . dataprep . api . preparation . Preparation . class ) . filter ( ( p ) -> ! ( interrupted . get ( ) ) ) . forEach ( ( p ) -> { if ( repository . exist ( . class , recentlyModified ( ) ) ) { org . talend . dataprep . maintenance . preparation . PreparationStepMarker . LOGGER . info ( "Interrupting<sp>clean<sp>up<sp>(preparation<sp>modified<sp>within<sp>last<sp>hour)." ) ; logRecentlyModified ( repository ) ; interrupted . set ( true ) ; return ; } final Collection < org . talend . dataprep . api . preparation . Identifiable > markedSteps = p . getSteps ( ) . stream ( ) . filter ( ( s ) -> ! ( java . util . Objects . equals ( s , Step . ROOT_STEP ) ) ) . peek ( ( s ) -> s . setMarker ( marker . toString ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; repository . add ( markedSteps ) ; } ) ; return interrupted . get ( ) ? Result . INTERRUPTED : Result . COMPLETED ; } | org . junit . Assert . assertEquals ( StepMarker . Result . INTERRUPTED , result ) |
testRemoteHeader ( ) { message . removeHeader ( "content-type" ) ; "<AssertPlaceHolder>" ; } getHeaders ( java . lang . String ) { java . util . List < java . lang . String > result = new java . util . ArrayList < java . lang . String > ( ) ; if ( ( headers ) != null ) { for ( au . com . sensis . stubby . model . StubParam header : headers ) { if ( header . getName ( ) . equalsIgnoreCase ( name ) ) { result . add ( header . getValue ( ) ) ; } } } return result ; } | org . junit . Assert . assertTrue ( message . getHeaders ( "content-type" ) . isEmpty ( ) ) |
testExecuteUserStringListOfStringKnownTargetHasIslandNether ( ) { when ( pm . getUUID ( org . mockito . Mockito . eq ( "tastybento" ) ) ) . thenReturn ( notUUID ) ; when ( im . hasIsland ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . any ( java . util . UUID . class ) ) ) . thenReturn ( true ) ; world . bentobox . bentobox . api . commands . admin . AdminTeleportCommand atc = new world . bentobox . bentobox . api . commands . admin . AdminTeleportCommand ( ac , "tpnether" ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( iwm ) . getNetherWorld ( org . mockito . Mockito . any ( ) ) ; org . mockito . Mockito . verify ( iwm , org . mockito . Mockito . never ( ) ) . getEndWorld ( org . mockito . Mockito . any ( ) ) ; org . mockito . Mockito . verify ( user ) . getTranslation ( org . mockito . Mockito . eq ( "commands.admin.tp.manual" ) , org . mockito . Mockito . eq ( "[location]" ) , org . mockito . Mockito . eq ( "0<sp>0<sp>0" ) ) ; } execute ( world . bentobox . bentobox . api . user . User , java . lang . String , java . util . List ) { user . sendRawMessage ( ( ( ( ( "About<sp>" + ( world . bentobox . bentobox . BentoBox . getInstance ( ) . getDescription ( ) . getName ( ) ) ) + "<sp>v" ) + ( world . bentobox . bentobox . BentoBox . getInstance ( ) . getDescription ( ) . getVersion ( ) ) ) + ":" ) ) ; user . sendRawMessage ( "Copyright<sp>(c)<sp>2017<sp>-<sp>2019<sp>Tastybento,<sp>Poslovitch" ) ; user . sendRawMessage ( "See<sp>https://www.eclipse.org/legal/epl-2.0/<sp>for<sp>license<sp>information." ) ; return true ; } | org . junit . Assert . assertTrue ( atc . execute ( user , "tpnether" , java . util . Collections . singletonList ( "tastybento" ) ) ) |
providesInstanceByParameter ( ) { org . everrest . core . tools . DependencySupplierImpl dependencySupplier = createDependencySupplier ( "foo" , ( - 1 ) ) ; java . lang . Object instance = dependencySupplier . getInstance ( createParameter ( java . lang . String . class , null , null ) ) ; "<AssertPlaceHolder>" ; } createParameter ( java . lang . Class , java . lang . reflect . Type , java . lang . annotation . Annotation [ ] ) { return new org . everrest . core . impl . ConstructorParameter ( null , ( annotations == null ? new java . lang . annotation . Annotation [ 0 ] : annotations ) , clazz , genericType , null , false ) ; } | org . junit . Assert . assertEquals ( "foo" , instance ) |
testVerify ( ) { com . picocontainer . MutablePicoContainer pico = new com . picocontainer . DefaultPicoContainer ( ) ; com . picocontainer . parameters . CollectionComponentParameter parameterNonEmpty = com . picocontainer . parameters . CollectionComponentParameter . ARRAY ; pico . addComponent ( com . picocontainer . defaults . CollectionComponentParameterTestCase . Shark . class ) ; parameterNonEmpty . verify ( pico , null , com . picocontainer . defaults . CollectionComponentParameterTestCase . Fish [ ] . class , null , false , null ) ; try { parameterNonEmpty . verify ( pico , null , com . picocontainer . defaults . CollectionComponentParameterTestCase . Cod [ ] . class , null , false , null ) ; org . junit . Assert . fail ( "(PicoCompositionException<sp>expected" ) ; } catch ( com . picocontainer . PicoCompositionException e ) { "<AssertPlaceHolder>" ; } com . picocontainer . parameters . CollectionComponentParameter parameterEmpty = com . picocontainer . parameters . CollectionComponentParameter . ARRAY_ALLOW_EMPTY ; parameterEmpty . verify ( pico , null , com . picocontainer . defaults . CollectionComponentParameterTestCase . Fish [ ] . class , null , false , null ) ; parameterEmpty . verify ( pico , null , com . picocontainer . defaults . CollectionComponentParameterTestCase . Cod [ ] . class , null , false , null ) ; } getMessage ( ) { return message ; } | org . junit . Assert . assertTrue ( ( ( e . getMessage ( ) . indexOf ( com . picocontainer . defaults . CollectionComponentParameterTestCase . Cod . class . getName ( ) ) ) > 0 ) ) |
testCoordinateForPositionOrigin ( ) { setUp ( ) ; builder . scale ( 30 ) ; builder . timestep ( 60 ) ; initGE ( ) ; double [ ] coords = new double [ ] { 0 , 0 } ; int [ ] coordinate = ge . coordinateForPosition ( coords [ 0 ] , coords [ 1 ] ) ; "<AssertPlaceHolder>" ; } coordinateForPosition ( double , double ) { double [ ] coordinate = toMercator ( longitude , lattitude ) ; coordinate [ 0 ] /= scale ; coordinate [ 1 ] /= scale ; return new int [ ] { ( ( int ) ( coordinate [ 0 ] ) ) , ( ( int ) ( coordinate [ 1 ] ) ) } ; } | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( new int [ ] { 0 , 0 } , coordinate ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . UserIdMapper . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "userIdMapperId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "userIdMapperId" , 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 ( ) ) |
hasNoParts ( ) { "<AssertPlaceHolder>" ; } getParts ( ) { return emptyList ( ) ; } | org . junit . Assert . assertThat ( entity . getParts ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . empty ( ) ) ) |
returnsTenUnitsWithinPlayableMapBoundaries ( ) { java . util . Set < com . fundynamic . d2tm . game . entities . Entity > result = entitiesSet . filter ( com . fundynamic . d2tm . game . entities . Predicate . builder ( ) . isWithinPlayableMapBoundaries ( map ) ) ; "<AssertPlaceHolder>" ; } isWithinPlayableMapBoundaries ( com . fundynamic . d2tm . math . MapCoordinate ) { int x = mapCoordinate . getXAsInt ( ) ; int y = mapCoordinate . getYAsInt ( ) ; return ( ( ( x >= 1 ) && ( x <= ( width ) ) ) && ( y >= 1 ) ) && ( y <= ( height ) ) ; } | org . junit . Assert . assertEquals ( 10 , result . size ( ) ) |
testReplicationStartTimeout ( ) { server1 = createServer ( "infinispan-replicated-config.xml" , "tcp-shared.xml" ) ; server2 = createServer ( "infinispan-replicated-config-1.xml" , "tcp-shared.xml" ) ; deployMatViewVDB ( server1 ) ; java . sql . Connection c1 = server1 . createConnection ( "jdbc:teiid:matviews" ) ; java . sql . Statement stmt = c1 . createStatement ( ) ; stmt . execute ( "select<sp>*<sp>from<sp>TEST.RANDOMVIEW" ) ; java . sql . ResultSet rs = stmt . getResultSet ( ) ; "<AssertPlaceHolder>" ; deployMatViewVDB ( server2 ) ; } next ( ) { checkClosed ( ) ; if ( hasNext ( ) ) { return batchResults . next ( ) ; } batchResults . next ( ) ; return false ; } | org . junit . Assert . assertTrue ( rs . next ( ) ) |
listCommand ( ) { java . lang . String listOutput = executeCommand ( "bundle:list<sp>-t<sp>0" , org . apache . karaf . itests . BundleTest . ADMIN_ROLES ) ; System . out . println ( listOutput ) ; "<AssertPlaceHolder>" ; } executeCommand ( java . lang . String , java . security . Principal [ ] ) { return executeCommand ( command , org . apache . karaf . itests . KarafTestSupport . COMMAND_TIMEOUT , false , principals ) ; } | org . junit . Assert . assertFalse ( listOutput . isEmpty ( ) ) |
testIFWithIndentAndExprWithIndentOnMultipleLines ( ) { org . stringtemplate . v4 . ST t = new org . stringtemplate . v4 . ST ( ( ( ( ( ( ( ( ( ( ( ( ( ( "begin" + ( newline ) ) + "<sp><if(x)>" ) + ( newline ) ) + "<sp><x>" ) + ( newline ) ) + "<sp><else>" ) + ( newline ) ) + "<sp><y>" ) + ( newline ) ) + "<sp><endif>" ) + ( newline ) ) + "end" ) + ( newline ) ) ) ; t . add ( "y" , "y" ) ; java . lang . String expecting = ( ( ( ( "begin" + ( newline ) ) + "<sp>y" ) + ( newline ) ) + "end" ) + ( newline ) ; java . lang . String result = t . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; } | org . junit . Assert . assertEquals ( expecting , result ) |
testSelecterenIdsVanOpTeSchonenProcessen ( ) { final java . util . List < java . lang . Long > processenLijst = new java . util . ArrayList ( ) ; processenLijst . add ( ( ( long ) ( 1 ) ) ) ; org . mockito . Mockito . when ( extractieDao . haalProcesIdsOpBasisVanBeeindigdeProcesExtractiesOp ( nl . bzk . migratiebrp . isc . opschoner . service . impl . ProcesServiceImplTest . DATUM_TOT ) ) . thenReturn ( processenLijst ) ; final java . util . List < java . lang . Long > result = subject . selecteerIdsVanOpTeSchonenProcessen ( nl . bzk . migratiebrp . isc . opschoner . service . impl . ProcesServiceImplTest . DATUM_TOT ) ; org . mockito . Mockito . verify ( extractieDao , org . mockito . Mockito . times ( 1 ) ) . haalProcesIdsOpBasisVanBeeindigdeProcesExtractiesOp ( nl . bzk . migratiebrp . isc . opschoner . service . impl . ProcesServiceImplTest . DATUM_TOT ) ; org . mockito . Mockito . verifyNoMoreInteractions ( extractieDao ) ; org . mockito . Mockito . verifyZeroInteractions ( jbpmDao , migDao ) ; "<AssertPlaceHolder>" ; } add ( T extends nl . bzk . brp . model . basis . ModelIdentificeerbaar ) { mutaties . add ( mutatie ) ; } | org . junit . Assert . assertEquals ( processenLijst , result ) |
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . mark . scale . exchange . MarkScaleExchange context = new org . lnu . is . domain . mark . scale . exchange . MarkScaleExchange ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>MarkScaleExchange<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . mark . scale . exchange . MarkScaleExchange > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; } | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testResolveFullyQualifiedName ( ) { typeResolver = com . thoughtworks . qdox . type . TypeResolver . byPackageName ( null , classLibrary , java . util . Collections . < java . lang . String > emptyList ( ) ) ; when ( classLibrary . hasClassReference ( "open.Bar" ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; } resolveType ( java . lang . String ) { java . lang . String result = resolvedTypeCache . get ( typeName ) ; if ( result == null ) { if ( ( declaringClass ) != null ) { int dollarIndex = declaringClass . indexOf ( '$' ) ; while ( ( result == null ) && ( dollarIndex > 0 ) ) { java . lang . String subType = ( declaringClass . substring ( 0 , ( dollarIndex + 1 ) ) ) + typeName ; result = resolveFromLibrary ( subType ) ; dollarIndex = declaringClass . indexOf ( '$' , ( dollarIndex + 1 ) ) ; } if ( result == null ) { java . lang . String nestedBinaryName = ( ( declaringClass ) + '$' ) + ( typeName . replace ( '.' , '$' ) ) ; result = resolveFromLibrary ( nestedBinaryName ) ; } } if ( result == null ) { result = resolveTypeInternal ( typeName ) ; } if ( result != null ) { resolvedTypeCache . put ( typeName , result ) ; } } return result ; } | org . junit . Assert . assertEquals ( "open.Bar" , typeResolver . resolveType ( "open.Bar" ) ) |
groupByEach ( ) { org . eclipse . collections . api . multimap . MutableMultimap < java . lang . Integer , java . lang . Integer > expected = org . eclipse . collections . impl . multimap . list . FastListMultimap . newMultimap ( ) ; for ( int i = 1 ; i < 8 ; i ++ ) { expected . putAll ( ( - i ) , org . eclipse . collections . impl . list . Interval . fromTo ( i , 7 ) ) ; } org . eclipse . collections . api . multimap . Multimap < java . lang . Integer , java . lang . Integer > actual = org . eclipse . collections . impl . utility . ArrayIterate . groupByEach ( new java . lang . Integer [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 } , new org . eclipse . collections . impl . block . function . NegativeIntervalFunction ( ) ) ; "<AssertPlaceHolder>" ; } fromTo ( int , int ) { if ( from <= to ) { return org . eclipse . collections . impl . list . Interval . fromToBy ( from , to , 1 ) ; } return org . eclipse . collections . impl . list . Interval . fromToBy ( from , to , ( - 1 ) ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testNestedPackage ( ) { org . eclipse . emf . ecore . resource . Resource ecoreResource = new org . eclipse . emf . ecore . xmi . impl . XMIResourceImpl ( ) ; org . eclipse . emf . ecore . resource . Resource genmodelResource = new org . eclipse . emf . ecore . xmi . impl . XMIResourceImpl ( ) ; org . eclipse . emf . ecore . EPackage parent = EcoreFactory . eINSTANCE . createEPackage ( ) ; parent . setName ( "parent" ) ; parent . setNsURI ( "http://parent" ) ; org . eclipse . emf . ecore . EPackage child = EcoreFactory . eINSTANCE . createEPackage ( ) ; child . setName ( "child" ) ; child . setNsURI ( "http://child" ) ; org . eclipse . emf . ecore . EClass eClass = EcoreFactory . eINSTANCE . createEClass ( ) ; eClass . setName ( "Test" ) ; child . getEClassifiers ( ) . add ( eClass ) ; parent . getESubpackages ( ) . add ( child ) ; ecoreResource . getContents ( ) . add ( parent ) ; org . eclipse . emf . codegen . ecore . genmodel . GenModel genModel = GenModelFactory . eINSTANCE . createGenModel ( ) ; genModel . initialize ( java . util . Collections . singleton ( parent ) ) ; genmodelResource . getContents ( ) . add ( genModel ) ; genModel . initialize ( true ) ; genModel . getGenPackages ( ) . get ( 0 ) . setBasePackage ( "org.foo.bar" ) ; genModel . getGenPackages ( ) . get ( 0 ) . getNestedGenPackages ( ) . get ( 0 ) . setBasePackage ( "org.foo.zonk" ) ; java . util . Map < org . eclipse . xtext . naming . QualifiedName , org . eclipse . xtext . resource . IEObjectDescription > index = createIndex ( genmodelResource ) ; getAndCheckEntry ( index , GenModelPackage . Literals . GEN_PACKAGE , "org.foo.bar.parent" ) ; getAndCheckEntry ( index , GenModelPackage . Literals . GEN_PACKAGE , "org.foo.zonk.child" ) ; getAndCheckEntry ( index , GenModelPackage . Literals . GEN_CLASS , "org.foo.zonk.child.Test" ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( primarySelection ) instanceof org . eclipse . jface . viewers . IStructuredSelection ? ( ( org . eclipse . jface . viewers . IStructuredSelection ) ( primarySelection ) ) . size ( ) : 0 ; } | org . junit . Assert . assertEquals ( 3 , index . size ( ) ) |
whenRequestingNeighborhoodOfTargetJob_sizeShouldBe4 ( ) { com . graphhopper . jsprit . core . algorithm . ruin . JobNeighborhoodsOptimized jn = new com . graphhopper . jsprit . core . algorithm . ruin . JobNeighborhoodsOptimized ( vrp , jobDistance , 4 ) ; jn . initialise ( ) ; java . util . Iterator < com . graphhopper . jsprit . core . problem . job . Job > iter = jn . getNearestNeighborsIterator ( 4 , target ) ; java . util . List < com . graphhopper . jsprit . core . problem . job . Service > services = new java . util . ArrayList < com . graphhopper . jsprit . core . problem . job . Service > ( ) ; while ( iter . hasNext ( ) ) { services . add ( ( ( com . graphhopper . jsprit . core . problem . job . Service ) ( iter . next ( ) ) ) ) ; } "<AssertPlaceHolder>" ; } next ( ) { return null ; } | org . junit . Assert . assertEquals ( 4 , services . size ( ) ) |
testEmptyConfig ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; conf . set ( "TestRange" , "" ) ; java . net . ServerSocket socket = new java . net . ServerSocket ( ) ; java . net . InetSocketAddress address = new java . net . InetSocketAddress ( "0.0.0.0" , 0 ) ; try { org . apache . hadoop . ipc . Server . bind ( socket , address , 10 , conf , "TestRange" ) ; "<AssertPlaceHolder>" ; } finally { socket . close ( ) ; } } isBound ( ) { return wrapped . isBound ( ) ; } | org . junit . Assert . assertTrue ( socket . isBound ( ) ) |
joinWithEmptyList ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( "" , instance . join ( ) ) |
testSerializationWithQuery ( ) { javax . jdo . PersistenceManager pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; java . lang . Object oid = null ; pm . currentTransaction ( ) . begin ( ) ; org . zoodb . test . api . TestSerializer ts1 = new org . zoodb . test . api . TestSerializer ( ) ; ts1 . init ( ) ; ts1 . check ( true ) ; pm . makePersistent ( ts1 ) ; oid = pm . getObjectId ( ts1 ) ; pm . currentTransaction ( ) . commit ( ) ; org . zoodb . test . testutil . TestTools . closePM ( ) ; org . zoodb . test . api . TestSerializer . resetStatic ( ) ; pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; pm . currentTransaction ( ) . begin ( ) ; org . zoodb . test . api . TestSerializer ts2 = ( ( org . zoodb . test . api . TestSerializer ) ( pm . getObjectById ( oid , true ) ) ) ; ts2 . check ( false ) ; pm . currentTransaction ( ) . commit ( ) ; org . zoodb . test . testutil . TestTools . closePM ( ) ; org . zoodb . test . api . TestSerializer . resetStatic ( ) ; pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; pm . currentTransaction ( ) . begin ( ) ; org . zoodb . test . api . TestSerializer ts3 = ( ( org . zoodb . test . api . TestSerializer ) ( pm . getObjectById ( oid ) ) ) ; ts3 . check ( false ) ; pm . currentTransaction ( ) . rollback ( ) ; pm . currentTransaction ( ) . begin ( ) ; ts3 . markDirtyTS ( ) ; java . lang . String QUERY_SWQ = "select<sp>from<sp>" + ( org . zoodb . test . api . TestSerializer . class . getName ( ) ) ; javax . jdo . Query q = pm . newQuery ( QUERY_SWQ ) ; java . util . Collection < org . zoodb . test . api . TestSerializer > qr = ( ( java . util . Collection < org . zoodb . test . api . TestSerializer > ) ( q . execute ( ) ) ) ; "<AssertPlaceHolder>" ; q . close ( qr ) ; pm . currentTransaction ( ) . commit ( ) ; org . zoodb . test . testutil . TestTools . closePM ( ) ; org . zoodb . test . api . TestSerializer . resetStatic ( ) ; pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; pm . currentTransaction ( ) . begin ( ) ; org . zoodb . test . api . TestSerializer ts4 = ( ( org . zoodb . test . api . TestSerializer ) ( pm . getObjectById ( oid , true ) ) ) ; ts4 . check ( false ) ; pm . currentTransaction ( ) . commit ( ) ; org . zoodb . test . testutil . TestTools . closePM ( ) ; org . zoodb . test . api . TestSerializer . resetStatic ( ) ; pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; pm . currentTransaction ( ) . begin ( ) ; org . zoodb . test . api . TestSerializer ts5 = ( ( org . zoodb . test . api . TestSerializer ) ( pm . getObjectById ( oid ) ) ) ; ts5 . check ( false ) ; ts5 . jdoZooMarkDirty ( ) ; javax . jdo . Extent < org . zoodb . test . api . TestSerializer > ex = pm . getExtent ( org . zoodb . test . api . TestSerializer . class , false ) ; ex . iterator ( ) ; ex . closeAll ( ) ; pm . currentTransaction ( ) . commit ( ) ; org . zoodb . test . testutil . TestTools . closePM ( ) ; org . zoodb . test . api . TestSerializer . resetStatic ( ) ; pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; pm . currentTransaction ( ) . begin ( ) ; org . zoodb . test . api . TestSerializer ts6 = ( ( org . zoodb . test . api . TestSerializer ) ( pm . getObjectById ( oid , true ) ) ) ; ts6 . check ( false ) ; pm . currentTransaction ( ) . commit ( ) ; org . zoodb . test . testutil . TestTools . closePM ( ) ; } iterator ( ) { return ext . iterator ( ) ; } | org . junit . Assert . assertTrue ( qr . iterator ( ) . hasNext ( ) ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . tools . service . builder . test . model . LVEntry . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . eq ( "lvEntryId" , com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ) ; java . util . List < com . liferay . portal . tools . service . builder . test . model . LVEntry > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; } | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testLength ( ) { boolean expResult = true ; javax . xml . xpath . XPathExpression expr = xpath . compile ( "//xs:element[@name='lengthField']//xs:length/@value<sp>=<sp>2" ) ; boolean result = ( ( java . lang . Boolean ) ( expr . evaluate ( schemaDocument , XPathConstants . BOOLEAN ) ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
stickiness_resolveTwice_metadataKeyUnChanged ( ) { java . util . Map < java . lang . String , java . lang . String > serviceConfig1 = new java . util . HashMap ( ) ; serviceConfig1 . put ( "stickinessMetadataKey" , "my-sticky-key1" ) ; io . grpc . Attributes attributes1 = io . grpc . Attributes . newBuilder ( ) . set ( GrpcAttributes . NAME_RESOLVER_SERVICE_CONFIG , serviceConfig1 ) . build ( ) ; loadBalancer . handleResolvedAddresses ( io . grpc . LoadBalancer . ResolvedAddresses . newBuilder ( ) . setServers ( servers ) . setAttributes ( attributes1 ) . build ( ) ) ; java . util . Map < java . lang . String , ? > stickinessMap1 = loadBalancer . getStickinessMapForTest ( ) ; loadBalancer . handleResolvedAddresses ( io . grpc . LoadBalancer . ResolvedAddresses . newBuilder ( ) . setServers ( servers ) . setAttributes ( attributes1 ) . build ( ) ) ; java . util . Map < java . lang . String , ? > stickinessMap2 = loadBalancer . getStickinessMapForTest ( ) ; "<AssertPlaceHolder>" ; } getStickinessMapForTest ( ) { if ( ( stickinessState ) == null ) { return null ; } return stickinessState . stickinessMap ; } | org . junit . Assert . assertSame ( stickinessMap1 , stickinessMap2 ) |
testLicenseExpirationEventNoExpirationDate ( ) { com . emc . storageos . systemservices . impl . eventhandler . connectemc . CallHomeEventManagerTest . MockCallHomeEventManager manager = new com . emc . storageos . systemservices . impl . eventhandler . connectemc . CallHomeEventManagerTest . MockCallHomeEventManager ( ) ; com . emc . storageos . systemservices . impl . licensing . LicenseInfoExt licenseInfo = new com . emc . storageos . systemservices . impl . licensing . LicenseInfoExt ( ) ; manager . setLicenseInfo ( licenseInfo ) ; "<AssertPlaceHolder>" ; } doSendLicenseExpiration ( com . emc . storageos . systemservices . impl . licensing . LicenseInfoExt ) { if ( licenseInfo == null ) { return true ; } java . lang . String lastExpirationDate = licenseInfo . getLastLicenseExpirationDateEventDate ( ) ; if ( ( ( lastExpirationDate == null ) || ( lastExpirationDate . isEmpty ( ) ) ) || ( lastExpirationDate . equals ( CallHomeConstants . VALUE_NOT_SET ) ) ) { com . emc . storageos . systemservices . impl . eventhandler . connectemc . CallHomeEventManager . _log . info ( "There<sp>is<sp>no<sp>previous<sp>license-expiration<sp>event<sp>sent." ) ; return true ; } com . emc . storageos . systemservices . impl . eventhandler . connectemc . CallHomeEventManager . _log . info ( "Previous<sp>license-expiration<sp>event<sp>was<sp>sent<sp>on:<sp>{}" , lastExpirationDate ) ; java . text . SimpleDateFormat storedDate = new java . text . SimpleDateFormat ( com . emc . storageos . systemservices . impl . eventhandler . connectemc . CallHomeEventManager . SERIALIZE_DATE_FORMAT ) ; java . util . Date zkDate = storedDate . parse ( lastExpirationDate ) ; java . util . Date today = java . util . Calendar . getInstance ( ) . getTime ( ) ; int days = org . joda . time . Days . daysBetween ( new org . joda . time . DateTime ( zkDate ) , new org . joda . time . DateTime ( today ) ) . getDays ( ) ; if ( days > ( ( CallHomeConstants . LICENSE_EXPIRATION_EVENT_THRESHOLD ) - 1 ) ) { com . emc . storageos . systemservices . impl . eventhandler . connectemc . CallHomeEventManager . _log . info ( "It's<sp>been<sp>{}<sp>days<sp>since<sp>last<sp>license-expiration<sp>event<sp>was<sp>sent.<sp>Sending<sp>another<sp>one<sp>now.<sp>" , days ) ; return true ; } com . emc . storageos . systemservices . impl . eventhandler . connectemc . CallHomeEventManager . _log . info ( "License-expired<sp>event<sp>was<sp>sent<sp>{}<sp>days<sp>back.<sp>Will<sp>send<sp>another<sp>one<sp>in<sp>{}<sp>days." , days , ( ( CallHomeConstants . LICENSE_EXPIRATION_EVENT_THRESHOLD ) - days ) ) ; return false ; } | org . junit . Assert . assertTrue ( manager . doSendLicenseExpiration ( licenseInfo ) ) |
testGetJobStatusReadOnlyComplete ( ) { when ( mockAuthorizationManager . isUserCreatorOrAdmin ( any ( org . sagebionetworks . repo . model . UserInfo . class ) , anyString ( ) ) ) . thenReturn ( true ) ; when ( mockStackStatusDao . getCurrentStatus ( ) ) . thenReturn ( StatusEnum . READ_ONLY ) ; org . sagebionetworks . repo . model . asynch . AsynchronousJobStatus status = new org . sagebionetworks . repo . model . asynch . AsynchronousJobStatus ( ) ; status . setStartedByUserId ( user . getId ( ) ) ; status . setJobId ( "999" ) ; status . setJobState ( AsynchJobState . COMPLETE ) ; when ( mockAsynchJobStatusDao . getJobStatus ( anyString ( ) ) ) . thenReturn ( status ) ; org . sagebionetworks . repo . model . asynch . AsynchronousJobStatus result = manager . getJobStatus ( user , "999" ) ; "<AssertPlaceHolder>" ; } getJobStatus ( org . sagebionetworks . repo . model . UserInfo , java . lang . String ) { if ( userInfo == null ) throw new java . lang . IllegalArgumentException ( "UserInfo<sp>cannot<sp>be<sp>null" ) ; org . sagebionetworks . repo . model . asynch . AsynchronousJobStatus status = lookupJobStatus ( jobId ) ; if ( ! ( authorizationManager . isUserCreatorOrAdmin ( userInfo , status . getStartedByUserId ( ) . toString ( ) ) ) ) { throw new org . sagebionetworks . repo . model . UnauthorizedException ( "Only<sp>the<sp>user<sp>that<sp>created<sp>a<sp>job<sp>can<sp>access<sp>the<sp>job's<sp>status." ) ; } return status ; } | org . junit . Assert . assertNotNull ( result ) |
testVerifyPassword_Empty ( ) { final int salt = 123456 ; final byte [ ] hash = org . oscm . authorization . PasswordHash . calculateHash ( salt , "<sp>" ) ; "<AssertPlaceHolder>" ; } verifyPassword ( long , byte [ ] , java . lang . String ) { return java . util . Arrays . equals ( org . oscm . authorization . PasswordHash . calculateHash ( salt , password ) , hash ) ; } | org . junit . Assert . assertTrue ( org . oscm . authorization . PasswordHash . verifyPassword ( salt , hash , "<sp>" ) ) |
testGetSecond ( ) { final com . annimon . stream . IntPair < java . lang . String > p = new com . annimon . stream . IntPair < java . lang . String > ( 1 , "first" ) ; "<AssertPlaceHolder>" ; } getSecond ( ) { return second ; } | org . junit . Assert . assertEquals ( "first" , p . getSecond ( ) ) |
test_getBundleSymbolicName_noMainAttr ( ) { java . util . jar . Manifest manifest = org . mockito . Mockito . mock ( java . util . jar . Manifest . class ) ; java . lang . String bundleSymbolicName = org . talend . commons . utils . resource . BundleFileUtil . getBundleSymbolicName ( manifest ) ; "<AssertPlaceHolder>" ; } getBundleSymbolicName ( java . util . jar . Manifest ) { if ( manifest == null ) { return null ; } java . util . jar . Attributes mainAttributes = manifest . getMainAttributes ( ) ; if ( mainAttributes == null ) { return null ; } java . lang . String name = mainAttributes . getValue ( "Bundle-SymbolicName" ) ; if ( name == null ) { return null ; } final int indexOf = name . indexOf ( ';' ) ; if ( indexOf > 0 ) name = name . substring ( 0 , indexOf ) ; return name ; } | org . junit . Assert . assertNull ( bundleSymbolicName ) |
createKeyStoreTest ( ) { org . arquillian . spacelift . Spacelift . task ( keyStoreToCreate , org . arquillian . droidium . container . task . CreateKeyStoreTask . class ) . sdk ( androidSDK ) . execute ( ) . await ( ) ; "<AssertPlaceHolder>" ; } sdk ( org . arquillian . droidium . container . configuration . AndroidSDK ) { this . androidSDK = androidSDK ; return this ; } | org . junit . Assert . assertTrue ( keyStoreToCreate . exists ( ) ) |
getStart ( ) { net . time4j . PlainTimestamp start = net . time4j . PlainTimestamp . of ( 2014 , 2 , 27 , 0 , 0 ) ; net . time4j . PlainTimestamp end = net . time4j . PlainTimestamp . of ( 2014 , 5 , 14 , 0 , 0 ) ; "<AssertPlaceHolder>" ; } between ( net . time4j . PlainTimestamp , net . time4j . PlainTimestamp ) { return new net . time4j . range . TimestampInterval ( net . time4j . range . Boundary . of ( net . time4j . range . IntervalEdge . CLOSED , start ) , net . time4j . range . Boundary . of ( net . time4j . range . IntervalEdge . OPEN , end ) ) ; } | org . junit . Assert . assertThat ( net . time4j . range . TimestampInterval . between ( start , end ) . getStart ( ) , org . hamcrest . CoreMatchers . is ( net . time4j . range . Boundary . of ( IntervalEdge . CLOSED , start ) ) ) |
testApplySchemaChangeOverLimit ( ) { java . lang . String viewId = "syn123" ; org . sagebionetworks . repo . model . table . ColumnChange change = new org . sagebionetworks . repo . model . table . ColumnChange ( ) ; change . setOldColumnId ( null ) ; change . setNewColumnId ( "456" ) ; java . util . List < org . sagebionetworks . repo . model . table . ColumnChange > changes = com . google . common . collect . Lists . newArrayList ( change ) ; org . sagebionetworks . repo . model . table . ColumnModel model = EntityField . benefactorId . getColumnModel ( ) ; model . setId ( change . getNewColumnId ( ) ) ; java . util . List < org . sagebionetworks . repo . model . table . ColumnModel > schema = com . google . common . collect . Lists . newArrayList ( model ) ; java . util . List < java . lang . String > newSchemaColumnIds = new java . util . LinkedList ( ) ; int columnCount = ( TableViewManagerImpl . MAX_COLUMNS_PER_VIEW ) + 1 ; for ( int i = 0 ; i < columnCount ; i ++ ) { newSchemaColumnIds . add ( ( "" + i ) ) ; } java . util . List < java . lang . String > newColumnIds = com . google . common . collect . Lists . newArrayList ( change . getNewColumnId ( ) ) ; when ( columnModelManager . calculateNewSchemaIdsAndValidate ( viewId , changes , newColumnIds ) ) . thenReturn ( newSchemaColumnIds ) ; when ( columnModelManager . getAndValidateColumnModels ( newColumnIds ) ) . thenReturn ( schema ) ; try { manager . applySchemaChange ( userInfo , viewId , changes , newColumnIds ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentException e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; } | org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( ( "" + ( TableViewManagerImpl . MAX_COLUMNS_PER_VIEW ) ) ) ) |
testMachineIsRunning_noSimulation_notRunning ( ) { org . mockito . Mockito . when ( this . standardAgentFactory . getInstancesNames ( ) ) . thenReturn ( new java . util . ArrayList < java . lang . String > ( 0 ) ) ; org . mockito . Mockito . when ( this . nazgulAgentFactory . getInstancesNames ( ) ) . thenReturn ( new java . util . ArrayList < java . lang . String > ( 0 ) ) ; java . util . Map < java . lang . String , java . lang . String > targetProperties = new java . util . HashMap ( ) ; targetProperties . put ( InMemoryHandler . EXECUTE_REAL_RECIPES , "true" ) ; net . roboconf . target . api . TargetHandlerParameters parameters = new net . roboconf . target . api . TargetHandlerParameters ( ) ; parameters . targetProperties ( targetProperties ) ; this . app . getTomcatVm ( ) . setStatus ( InstanceStatus . NOT_DEPLOYED ) ; java . lang . String machineId = ( ( net . roboconf . core . model . helpers . InstanceHelpers . computeInstancePath ( this . app . getTomcatVm ( ) ) ) + "<sp>@<sp>" ) + ( this . app . getName ( ) ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( this . nazgulAgentFactory , org . mockito . Mockito . times ( 0 ) ) . createComponentInstance ( org . mockito . Mockito . any ( java . util . Dictionary . class ) ) ; } isMachineRunning ( net . roboconf . target . api . TargetHandlerParameters , java . lang . String ) { return this . agentIdToAgent . containsKey ( machineId ) ; } | org . junit . Assert . assertFalse ( this . handler . isMachineRunning ( parameters , machineId ) ) |
testCanSetupLimitedValueWhenOperatorNeedsAValue ( ) { when ( plugin . editingCol ( ) ) . thenReturn ( new org . drools . workbench . models . guided . dtable . shared . model . LimitedEntryConditionCol52 ( ) ) ; when ( plugin . doesOperatorNeedValue ( ) ) . thenReturn ( false ) ; "<AssertPlaceHolder>" ; } canSetupLimitedValue ( ) { if ( ! ( isLimitedValueEnabled ( ) ) ) { return false ; } if ( ( tableFormat ( ) ) != ( GuidedDecisionTable52 . TableFormat . LIMITED_ENTRY ) ) { return false ; } if ( doesNotHaveFactTypeOrFactField ( ) ) { return false ; } if ( ! ( org . drools . workbench . screens . guided . dtable . client . wizard . column . pages . ValueOptionsPage . plugin ( ) . doesOperatorNeedValue ( ) ) ) { return false ; } return true ; } | org . junit . Assert . assertFalse ( page . canSetupLimitedValue ( ) ) |
whenReadingShipments_itReadsThemCorrectly ( ) { com . graphhopper . jsprit . core . problem . VehicleRoutingProblem . Builder builder = VehicleRoutingProblem . Builder . newInstance ( ) ; new com . graphhopper . jsprit . io . problem . VrpXMLReader ( builder , null ) . read ( inputStream ) ; com . graphhopper . jsprit . core . problem . VehicleRoutingProblem vrp = builder . build ( ) ; int shipCounter = 0 ; for ( com . graphhopper . jsprit . core . problem . job . Job j : vrp . getJobs ( ) . values ( ) ) { if ( j instanceof com . graphhopper . jsprit . core . problem . job . Shipment ) shipCounter ++ ; } "<AssertPlaceHolder>" ; } values ( ) { return java . util . Collections . unmodifiableSet ( skills ) ; } | org . junit . Assert . assertEquals ( 2 , shipCounter ) |
convertRedirectServerSyncTest ( ) { org . kaaproject . kaa . server . sync . platform . AvroEncDec avroEncDec = new org . kaaproject . kaa . server . sync . platform . AvroEncDec ( ) ; java . lang . reflect . Method method = org . kaaproject . kaa . server . sync . platform . AvroEncDec . class . getDeclaredMethod ( org . kaaproject . kaa . server . sync . platform . AvroEncDecTest . CONVER_METHOD , org . kaaproject . kaa . server . sync . RedirectServerSync . class ) ; method . setAccessible ( true ) ; org . kaaproject . kaa . server . sync . RedirectServerSync serverSync = null ; "<AssertPlaceHolder>" ; method . invoke ( avroEncDec , new org . kaaproject . kaa . server . sync . RedirectServerSync ( ) ) ; } | org . junit . Assert . assertNull ( method . invoke ( avroEncDec , serverSync ) ) |
testGetSum ( ) { com . javapractice . leetcode . SumOfTwoIntegers test = new com . javapractice . leetcode . SumOfTwoIntegers ( ) ; "<AssertPlaceHolder>" ; } getSum ( int , int ) { if ( ( start < 0 ) || ( end > ( ( length ) - 1 ) ) ) { throw new java . lang . RuntimeException ( "Invalid<sp>Input" ) ; } return getSumUtil ( 0 , ( ( length ) - 1 ) , start , end , 0 ) ; } | org . junit . Assert . assertEquals ( test . getSum ( 1 , 2 ) , 3 ) |
testGatherSimple ( ) { org . nd4j . autodiff . samediff . SameDiff sameDiff = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 1 , 2 , 3 , 4 } , new long [ ] { 2 , 2 } ) ; org . nd4j . autodiff . samediff . SDVariable x = sameDiff . var ( "x" , arr ) ; org . nd4j . autodiff . samediff . SDVariable result = sameDiff . gather ( x , new int [ ] { 1 , 0 } , 1 ) ; org . nd4j . linalg . api . ndarray . INDArray expected = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 2 , 1 , 4 , 3 } , new long [ ] { 2 , 2 } ) ; "<AssertPlaceHolder>" ; } eval ( ) { sameDiff . exec ( null , getVarName ( ) ) ; return getArr ( ) ; } | org . junit . Assert . assertEquals ( expected , result . eval ( ) ) |
readBytes_onClosedStream ( ) { final java . lang . String testString = "helloWorld" ; final byte [ ] testData = testString . getBytes ( ) ; final java . io . InputStream is = new org . exist . util . io . FastByteArrayInputStream ( testData ) ; final org . exist . util . io . CachingFilterInputStream cfis = new org . exist . util . io . CachingFilterInputStream ( getNewCache ( is ) ) ; final byte [ ] result = new byte [ 2 ] ; cfis . read ( result ) ; "<AssertPlaceHolder>" ; cfis . close ( ) ; cfis . read ( result ) ; } subArray ( byte [ ] , int ) { byte [ ] newData = new byte [ len ] ; java . lang . System . arraycopy ( data , 0 , newData , 0 , len ) ; return newData ; } | org . junit . Assert . assertArrayEquals ( subArray ( testData , 2 ) , result ) |
quote ( ) { hudson . model . Label l = j . jenkins . getLabel ( "\"abc\\\\\\\"def\"" ) ; org . junit . Assert . assertEquals ( "abc\\\"def" , l . getName ( ) ) ; l = j . jenkins . getLabel ( "label1||label2" ) ; l = j . jenkins . getLabel ( "\"label1||label2\"" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return null ; } | org . junit . Assert . assertEquals ( "label1||label2" , l . getName ( ) ) |
toPrimitiveBooleanForEmptyString ( ) { "<AssertPlaceHolder>" ; } toPrimitiveBoolean ( java . lang . Object ) { java . lang . Boolean b = org . slim3 . util . BooleanUtil . toBoolean ( o ) ; if ( b != null ) { return b . booleanValue ( ) ; } return false ; } | org . junit . Assert . assertThat ( org . slim3 . util . BooleanUtil . toPrimitiveBoolean ( "" ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testRollback ( ) { final java . util . concurrent . atomic . AtomicInteger i = new java . util . concurrent . atomic . AtomicInteger ( 1 ) ; ch . maxant . generic_jca_adapter . MicroserviceXAResource xa = new ch . maxant . generic_jca_adapter . MicroserviceXAResource ( "a" , new ch . maxant . generic_jca_adapter . CommitRollbackCallback ( ) { private static final long serialVersionUID = 1L ; @ ch . maxant . generic_jca_adapter . Override public void rollback ( java . lang . String txid ) throws ch . maxant . generic_jca_adapter . Exception { i . incrementAndGet ( ) ; } @ ch . maxant . generic_jca_adapter . Override public void commit ( java . lang . String txid ) throws ch . maxant . generic_jca_adapter . Exception { org . junit . Assert . fail ( "not<sp>expected<sp>here" ) ; } } ) ; xa . rollback ( new javax . transaction . xa . Xid ( ) { @ ch . maxant . generic_jca_adapter . Override public byte [ ] getGlobalTransactionId ( ) { return "gtxid" . getBytes ( ) ; } @ ch . maxant . generic_jca_adapter . Override public int getFormatId ( ) { return 99 ; } @ ch . maxant . generic_jca_adapter . Override public byte [ ] getBranchQualifier ( ) { return "bq" . getBytes ( ) ; } } ) ; "<AssertPlaceHolder>" ; } getBranchQualifier ( ) { return bq ; } | org . junit . Assert . assertEquals ( 2 , i . get ( ) ) |
testPluginPDF ( ) { request . setPluginPDF ( true ) ; "<AssertPlaceHolder>" ; } getPluginPDF ( ) { return getBooleanParameter ( org . piwik . java . tracking . PiwikRequest . PLUGIN_PDF ) ; } | org . junit . Assert . assertEquals ( true , request . getPluginPDF ( ) ) |
encodeBase64MultipleOf4Minus2CharactersSuccess ( ) { java . lang . String textToEncode = "This<sp>is<sp>a<sp>valid<sp>test<sp>(aBcDeFgHiJKLmnoPqRstuVWXyz)-01234567" ; java . lang . String expectedBase64Result = "VGhpcyBpcyBhIHZhbGlkIHRlc3QgKGFCY0RlRmdIaUpLTG1ub1BxUnN0dVZXWHl6KS0wMTIzNDU2Nw==" ; byte [ ] result = com . microsoft . azure . sdk . iot . deps . util . Base64 . encodeBase64Local ( textToEncode . getBytes ( ) ) ; "<AssertPlaceHolder>" ; } getBytes ( ) { return this . body ; } | org . junit . Assert . assertEquals ( expectedBase64Result , new java . lang . String ( result ) ) |
testGetSubDataTypeStack ( ) { final org . kie . workbench . common . dmn . client . editors . types . common . DataType dataType = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final java . lang . String uuid = "uuid" ; when ( typeStack . get ( uuid ) ) . thenReturn ( asList ( "tPerson" , "tCompany" ) ) ; when ( dataType . getUUID ( ) ) . thenReturn ( uuid ) ; when ( dataType . getType ( ) ) . thenReturn ( "tCity" ) ; doReturn ( dataType ) . when ( manager ) . getDataType ( ) ; final java . util . List < java . lang . String > actualTypeStack = manager . getSubDataTypeStack ( ) ; final java . util . List < java . lang . String > expectedTypeStack = asList ( "tPerson" , "tCompany" , "tCity" ) ; "<AssertPlaceHolder>" ; } getSubDataTypeStack ( ) { final java . util . List < java . lang . String > subDataTypeStack = new java . util . ArrayList ( getTypeStack ( ) ) ; getStackType ( ) . ifPresent ( subDataTypeStack :: add ) ; return subDataTypeStack ; } | org . junit . Assert . assertEquals ( expectedTypeStack , actualTypeStack ) |
testEqualsWithDifferentValue ( ) { java . util . Map < java . lang . String , java . lang . String > attributes = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; attributes . put ( "att123" , "val123" ) ; java . util . Map < java . lang . String , java . lang . String > attributes2 = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; attributes2 . put ( "att456" , "val456" ) ; org . o3project . odenos . core . component . network . topology . Port port = new org . o3project . odenos . core . component . network . topology . Port ( "123" , "out_link123" 1 , "node_id123" , "out_link123" , "out_link123" 2 , attributes ) ; org . o3project . odenos . core . component . network . topology . Port port2 = new org . o3project . odenos . core . component . network . topology . Port ( "456" , "out_link123" 3 , "out_link123" 0 , "out_link456" , "in_link456" , attributes2 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . o3project . odenos . remoteobject . event . EventSubscription ) ) { return false ; } org . o3project . odenos . remoteobject . event . EventSubscription eventSubscription = ( ( org . o3project . odenos . remoteobject . event . EventSubscription ) ( obj ) ) ; return this . subscriberId . equals ( eventSubscription . getSubscriberId ( ) ) ; } | org . junit . Assert . assertFalse ( port . equals ( port2 ) ) |
getMd5FromBytesTest ( ) { java . io . File file = new java . io . File ( "F:\\Blizzard\\World<sp>of<sp>Warcraft\\Wow-64.exe" ) ; byte [ ] byteArray = this . getByteArrayFromFile ( file ) ; java . lang . String fileMD5 = com . jhonelee . jfdf . image . utils . MD5Utils . getMd5FromBytes ( byteArray ) ; "<AssertPlaceHolder>" ; System . out . print ( fileMD5 ) ; } getMd5FromBytes ( byte [ ] ) { try { java . security . MessageDigest md = java . security . MessageDigest . getInstance ( "MD5" ) ; md . update ( input ) ; byte [ ] digest = md . digest ( ) ; return new java . lang . String ( org . apache . commons . codec . binary . Hex . encodeHex ( digest ) ) ; } catch ( java . security . NoSuchAlgorithmException e ) { throw new java . lang . RuntimeException ( "Md5<sp>encode<sp>faild!" , e ) ; } } | org . junit . Assert . assertNotNull ( fileMD5 ) |
roundSeconds1 ( ) { org . diirt . graphene . TimeScales . TimePeriod period = org . diirt . graphene . TimeScales . toTimePeriod ( 30.0 ) ; "<AssertPlaceHolder>" ; } toTimePeriod ( double ) { if ( seconds >= 36288000 ) { return new org . diirt . graphene . TimeScales . TimePeriod ( java . util . GregorianCalendar . YEAR , ( seconds / 3024000 ) ) ; } if ( seconds >= 3024000 ) { return new org . diirt . graphene . TimeScales . TimePeriod ( java . util . GregorianCalendar . MONTH , ( seconds / 3024000 ) ) ; } if ( seconds >= 604800 ) { return new org . diirt . graphene . TimeScales . TimePeriod ( org . diirt . graphene . TimeScales . WEEK_FIELD_ID , ( seconds / 604800.0 ) ) ; } if ( seconds >= 86400 ) { return new org . diirt . graphene . TimeScales . TimePeriod ( org . diirt . graphene . TimeScales . DAY_FIELD_ID , ( seconds / 86400.0 ) ) ; } if ( seconds >= 3600 ) { return new org . diirt . graphene . TimeScales . TimePeriod ( org . diirt . graphene . TimeScales . HOUR_FIELD_ID , ( seconds / 3600.0 ) ) ; } if ( seconds >= 60 ) { return new org . diirt . graphene . TimeScales . TimePeriod ( java . util . GregorianCalendar . MINUTE , ( seconds / 60.0 ) ) ; } if ( seconds >= 1 ) { return new org . diirt . graphene . TimeScales . TimePeriod ( java . util . GregorianCalendar . SECOND , seconds ) ; } return new org . diirt . graphene . TimeScales . TimePeriod ( java . util . GregorianCalendar . MILLISECOND , ( 1000 * seconds ) ) ; } | org . junit . Assert . assertThat ( period , equalTo ( new org . diirt . graphene . TimeScales . TimePeriod ( SECOND , 30.0 ) ) ) |
testRemove ( ) { java . lang . String newConfig = ( ( java . lang . String ) ( run ( "PARSER_STELLAR_TRANSFORM_ADD(config,<sp>SHELL_VARS2MAP('upper'))" , com . google . common . collect . ImmutableMap . of ( "config" , emptyTransformationsConfig ) , context ) ) ) ; newConfig = ( ( java . lang . String ) ( run ( "PARSER_STELLAR_TRANSFORM_REMOVE(config,<sp>['upper'])" , com . google . common . collect . ImmutableMap . of ( "config" , newConfig ) , context ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > transformations = transform ( newConfig ) ; "<AssertPlaceHolder>" ; } size ( ) { int size = 0 ; for ( java . util . Map m : variableMappings ) { size += m . size ( ) ; } return size ; } | org . junit . Assert . assertEquals ( 0 , transformations . size ( ) ) |
testGetAllSubscriptionActionsForOrganizationBySubId ( ) { container . login ( userKey3 , org . oscm . triggerservice . bean . ROLE_ORGANIZATION_ADMIN ) ; java . util . List < org . oscm . triggerservice . bean . VOTriggerProcess > list = triggerServiceLocal . getAllActionsForSubscription ( "subId" ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; } | org . junit . Assert . assertEquals ( 2 , list . size ( ) ) |
getAccountsTest ( ) { java . util . List < com . docdoku . api . models . AccountDTO > accounts = new com . docdoku . api . services . AdminApi ( TestConfig . ROOT_CLIENT ) . getAccounts ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( accounts . isEmpty ( ) ) |
whenHasNextThenResultTrue ( ) { vkaretko . MyArrayList list = new vkaretko . MyArrayList ( ) ; list . add ( 0 ) ; java . util . Iterator itr = list . iterator ( ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return ( cursor ) != ( size ) ; } | org . junit . Assert . assertThat ( itr . hasNext ( ) , org . hamcrest . core . Is . is ( true ) ) |
testReturnsAnExactMatchWithSpecifiedVersion ( ) { org . json . JSONObject jsonSource = new org . json . JSONObject ( ) ; jsonSource . put ( "aut" , "io.selendroid.test:0.11.0" ) ; io . selendroid . common . SelendroidCapabilities capa = new io . selendroid . common . SelendroidCapabilities ( jsonSource ) ; java . lang . String defaultApp = capa . getDefaultApp ( io . selendroid . common . SelendroidCapabilitiesGetDefaultAppTest . supportedApps ) ; "<AssertPlaceHolder>" ; } getDefaultApp ( java . util . Set ) { java . lang . String defaultApp = getAut ( ) ; if ( ( getLaunchActivity ( ) ) != null ) { return defaultApp ; } if ( ! ( defaultApp . contains ( ":" ) ) ) { return getDefaultVersion ( supportedApps , defaultApp ) ; } return supportedApps . contains ( defaultApp ) ? defaultApp : null ; } | org . junit . Assert . assertEquals ( "io.selendroid.test:0.11.0" , defaultApp ) |
relayoutPropertySetLeadsToInvalidation ( ) { jetbrains . jetpad . projectional . view . View view = newView ( ) ; view . validate ( ) ; view . set ( new jetbrains . jetpad . projectional . view . ViewPropertySpec ( "a" , ViewPropertyKind . RELAYOUT ) , new java . lang . Object ( ) ) ; "<AssertPlaceHolder>" ; } valid ( ) { return new jetbrains . jetpad . projectional . view . BaseReadableProperty < java . lang . Boolean > ( ) { @ jetbrains . jetpad . projectional . view . Override public jetbrains . jetpad . projectional . view . Boolean get ( ) { return myValid ; } @ jetbrains . jetpad . projectional . view . Override public jetbrains . jetpad . base . Registration addHandler ( final jetbrains . jetpad . projectional . view . EventHandler < ? super jetbrains . jetpad . projectional . view . PropertyChangeEvent < java . lang . Boolean > > handler ) { return addListener ( new jetbrains . jetpad . projectional . view . ViewAdapter ( ) { @ jetbrains . jetpad . projectional . view . Override public void onViewValidated ( ) { handler . onEvent ( new jetbrains . jetpad . projectional . view . PropertyChangeEvent ( false , true ) ) ; } @ jetbrains . jetpad . projectional . view . Override public void onViewInvalidated ( ) { handler . onEvent ( new jetbrains . jetpad . projectional . view . PropertyChangeEvent ( true , false ) ) ; } } ) ; } } ; } | org . junit . Assert . assertFalse ( view . valid ( ) . get ( ) ) |
createLinkedList_varArgs_withNull ( ) { java . util . List < java . lang . Integer > list = createLinkedList ( ( ( java . lang . Integer [ ] ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } createLinkedList ( java . lang . Iterable ) { java . util . LinkedList < T > list = new java . util . LinkedList < T > ( ) ; com . alibaba . citrus . util . CollectionUtil . iterableToCollection ( c , list ) ; return list ; } | org . junit . Assert . assertTrue ( ( list instanceof java . util . LinkedList < ? > ) ) |
testCreate ( ) { org . oscarehr . common . model . RemoteReferral entity = new org . oscarehr . common . model . RemoteReferral ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; } | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
testRetries ( ) { com . vladmihalcea . mongo . model . Product product = new com . vladmihalcea . mongo . model . Product ( ) ; product . setId ( 123L ) ; product . setName ( "Tv" ) ; productRepository . save ( product ) ; com . vladmihalcea . mongo . model . Product savedProduct = productRepository . findOne ( 123L ) ; "<AssertPlaceHolder>" ; final int threadsNumber = 10 ; final java . util . concurrent . atomic . AtomicInteger atomicInteger = new java . util . concurrent . atomic . AtomicInteger ( ) ; final java . util . concurrent . CountDownLatch startLatch = new java . util . concurrent . CountDownLatch ( ( threadsNumber + 1 ) ) ; final java . util . concurrent . CountDownLatch endLatch = new java . util . concurrent . CountDownLatch ( ( threadsNumber + 1 ) ) ; for ( ; ( atomicInteger . get ( ) ) < threadsNumber ; atomicInteger . incrementAndGet ( ) ) { final long index = ( ( long ) ( atomicInteger . get ( ) ) ) * threadsNumber ; com . vladmihalcea . mongo . dao . ProductRepositoryIT . LOGGER . info ( "Scheduling<sp>thread<sp>index<sp>{}" , index ) ; java . lang . Thread testThread = new java . lang . Thread ( new java . lang . Runnable ( ) { @ com . vladmihalcea . mongo . dao . Override public void run ( ) { try { startLatch . countDown ( ) ; startLatch . await ( ) ; productService . updateName ( 123L , java . util . UUID . randomUUID ( ) . toString ( ) ) ; } catch ( java . lang . InterruptedException e ) { java . lang . Thread . currentThread ( ) . interrupt ( ) ; } catch ( java . lang . Exception e ) { com . vladmihalcea . mongo . dao . ProductRepositoryIT . LOGGER . error ( "Exception<sp>thrown!" , e ) ; } finally { endLatch . countDown ( ) ; } } } ) ; testThread . start ( ) ; } startLatch . countDown ( ) ; com . vladmihalcea . mongo . dao . ProductRepositoryIT . LOGGER . info ( "Waiting<sp>for<sp>threads<sp>to<sp>be<sp>done" ) ; endLatch . countDown ( ) ; endLatch . await ( ) ; com . vladmihalcea . mongo . dao . ProductRepositoryIT . LOGGER . info ( "Threads<sp>are<sp>done" ) ; } setName ( java . lang . String ) { this . name = name ; } | org . junit . Assert . assertEquals ( savedProduct , product ) |
testTautology ( ) { org . infinispan . query . dsl . QueryFactory qf = org . infinispan . all . embeddedquery . QueryDslConditionsTest . getQueryFactory ( ) ; org . infinispan . query . dsl . Query q = qf . from ( org . infinispan . all . embeddedquery . QueryDslConditionsTest . getModelFactory ( ) . getUserImplClass ( ) ) . having ( "name" ) . gt ( "A" ) . or ( ) . having ( "name" ) . lte ( "A" ) . build ( ) ; java . util . List < org . infinispan . all . embeddedquery . testdomain . User > list = q . list ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return cache . size ( ) ; } | org . junit . Assert . assertEquals ( 3 , list . size ( ) ) |
testNotDocIdSet ( ) { System . out . println ( "" ) ; System . out . println ( "Running<sp>NotDocIdSet<sp>test" ) ; System . out . println ( "----------------------------" ) ; int max = 1000 ; if ( ( _max ) > 1000 ) max = ( _max ) / 1000 ; int length = 100 ; if ( ( _length ) > 100 ) length = ( _length ) / 100 ; java . util . Random random = new java . util . Random ( ) ; int randomizer = 0 ; int b = 0 ; java . util . ArrayList < java . lang . Integer > intSet = new java . util . ArrayList < java . lang . Integer > ( ) ; com . kamikaze . docidset . impl . PForDeltaDocIdSet docSet = new com . kamikaze . docidset . impl . PForDeltaDocIdSet ( com . kamikaze . test . PForDeltaTestParameterizedDocSetsTest . batch ) ; java . util . Set < java . lang . Integer > uniqueSet = new java . util . TreeSet < java . lang . Integer > ( ) ; randomizer = 0 ; for ( int i = 1 ; i < ( length + 1 ) ; i ++ ) { int [ ] bVal = new int [ 33 ] ; for ( int k = 0 ; k < ( com . kamikaze . test . PForDeltaTestParameterizedDocSetsTest . batch ) ; k ++ ) { b = randomizer + ( ( int ) ( ( random . nextDouble ( ) ) * 1000 ) ) ; uniqueSet . add ( b ) ; } randomizer += 1000 ; } for ( java . lang . Integer c : uniqueSet ) { docSet . addDoc ( c ) ; } org . apache . lucene . search . DocIdSetIterator oit = new com . kamikaze . docidset . impl . NotDocIdSet ( docSet , max ) . iterator ( ) ; int docid ; while ( ( docid = oit . nextDoc ( ) ) != ( org . apache . lucene . search . DocIdSetIterator . NO_MORE_DOCS ) ) { "<AssertPlaceHolder>" ; } } contains ( int ) { int size = this . size ( ) ; for ( int i = 0 ; i < size ; ++ i ) { if ( ( get ( i ) ) == elem ) return true ; } return false ; } | org . junit . Assert . assertFalse ( intSet . contains ( docid ) ) |
testListMessageCounterAsHTML ( ) { org . apache . activemq . artemis . api . core . SimpleString address = org . apache . activemq . artemis . utils . RandomUtil . randomSimpleString ( ) ; org . apache . activemq . artemis . api . core . SimpleString queue = org . apache . activemq . artemis . utils . RandomUtil . randomSimpleString ( ) ; session . createQueue ( address , RoutingType . MULTICAST , queue , null , durable ) ; org . apache . activemq . artemis . api . core . management . QueueControl queueControl = createManagementControl ( address , queue ) ; java . lang . String history = queueControl . listMessageCounterAsHTML ( ) ; "<AssertPlaceHolder>" ; session . deleteQueue ( queue ) ; } listMessageCounterAsHTML ( ) { if ( org . apache . activemq . artemis . logs . AuditLogger . isEnabled ( ) ) { org . apache . activemq . artemis . logs . AuditLogger . listMessageCounterAsHTML ( queue ) ; } checkStarted ( ) ; clearIO ( ) ; try { return org . apache . activemq . artemis . core . messagecounter . impl . MessageCounterHelper . listMessageCounterAsHTML ( new org . apache . activemq . artemis . core . messagecounter . MessageCounter [ ] { counter } ) ; } finally { blockOnIO ( ) ; } } | org . junit . Assert . assertNotNull ( history ) |
testAdditionalFeatures ( ) { org . apache . uima . collection . CollectionReader ner = createReader ( de . tudarmstadt . ukp . dkpro . core . io . negra . NegraExportReader . class , NegraExportReader . PARAM_SOURCE_LOCATION , "src/test/resources/tuebadz/corpus-sample.export" , NegraExportReader . PARAM_LANGUAGE , "de" , NegraExportReader . PARAM_SOURCE_ENCODING , "UTF-8" ) ; org . apache . uima . analysis_engine . AnalysisEngineDescription tag = createEngineDescription ( de . tudarmstadt . ukp . dkpro . core . opennlp . OpenNlpPosTagger . class ) ; org . apache . uima . analysis_engine . AnalysisEngineDescription stem = createEngineDescription ( de . tudarmstadt . ukp . dkpro . core . snowball . SnowballStemmer . class ) ; org . apache . uima . analysis_engine . AnalysisEngineDescription tw = createEngineDescription ( de . tudarmstadt . ukp . dkpro . core . io . imscwb . ImsCwbWriter . class , ImsCwbWriter . PARAM_TARGET_LOCATION , de . tudarmstadt . ukp . dkpro . core . io . imscwb . ImsCwbWriterTest . outputFile , ImsCwbWriter . PARAM_TARGET_ENCODING , "UTF-8" , ImsCwbWriter . PARAM_WRITE_CPOS , true , ImsCwbWriter . PARAM_ADDITIONAL_FEATURES , new java . lang . String [ ] { "de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Stem/value" } ) ; org . apache . uima . analysis_engine . AnalysisEngineDescription cdw = createEngineDescription ( org . apache . uima . fit . component . CasDumpWriter . class , CasDumpWriter . PARAM_OUTPUT_FILE , "target/dump.txt" ) ; runPipeline ( ner , tag , stem , tw , cdw ) ; java . lang . String reference = org . apache . commons . io . FileUtils . readFileToString ( new java . io . File ( "src/test/resources/tuebadz/corpus-sample-addfeat-ref.txt" ) , "UTF-8" ) ; java . lang . String actual = org . apache . commons . io . FileUtils . readFileToString ( new java . io . File ( de . tudarmstadt . ukp . dkpro . core . io . imscwb . ImsCwbWriterTest . outputFile ) , "UTF-8" ) ; reference = de . tudarmstadt . ukp . dkpro . core . testing . EOLUtils . normalizeLineEndings ( reference ) ; actual = de . tudarmstadt . ukp . dkpro . core . testing . EOLUtils . normalizeLineEndings ( actual ) ; "<AssertPlaceHolder>" ; } normalizeLineEndings ( java . lang . String ) { java . lang . String result = text . replaceAll ( "\\r\\n" , "\n" ) ; result = result . replaceAll ( "\\r" , "\n" ) ; return result ; } | org . junit . Assert . assertEquals ( reference , actual ) |
forkNodeIncomingsOutgoingsMustBeControlFlows ( ) { org . eclipse . uml2 . uml . ForkNode node = UMLFactory . eINSTANCE . createForkNode ( ) ; org . eclipse . uml2 . uml . ObjectFlow inFlow = UMLFactory . eINSTANCE . createObjectFlow ( ) ; node . getIncomings ( ) . add ( inFlow ) ; "<AssertPlaceHolder>" ; } isValidControlFlowStart ( org . eclipse . uml2 . uml . Element ) { if ( preSource instanceof org . eclipse . uml2 . uml . ActivityNode ) { for ( final org . eclipse . uml2 . uml . ActivityEdge incoming : ( ( org . eclipse . uml2 . uml . ActivityNode ) ( preSource ) ) . getIncomings ( ) ) { if ( incoming instanceof org . eclipse . uml2 . uml . ObjectFlow ) { return false ; } } } return isValidFlowStart ( preSource ) ; } | org . junit . Assert . assertFalse ( services . isValidControlFlowStart ( node ) ) |
testSetFieldValue ( ) { final java . lang . reflect . Field someField = ru . yandex . qatools . camelot . util . ServiceUtilTest . SomeClass . class . getDeclaredField ( "someField" ) ; ru . yandex . qatools . camelot . util . ServiceUtil . setFieldValue ( someField , someObject , "test" ) ; ru . yandex . qatools . camelot . util . ServiceUtil . setFieldValue ( someField , null , "test" ) ; "<AssertPlaceHolder>" ; } setFieldValue ( java . lang . reflect . Field , java . lang . Object , T ) { if ( instance != null ) { boolean oldAccessible = field . isAccessible ( ) ; field . setAccessible ( true ) ; field . set ( instance , value ) ; field . setAccessible ( oldAccessible ) ; return value ; } return null ; } | org . junit . Assert . assertEquals ( someObject . someField , "test" ) |
testCreateColumnNameHeaderWithRowId ( ) { java . util . List < org . sagebionetworks . repo . model . table . SelectColumn > schema = com . google . common . collect . Lists . newArrayList ( ) ; schema . add ( org . sagebionetworks . repo . model . dbo . dao . table . TableModelTestUtils . createSelectColumn ( 123L , "three" , ColumnType . STRING ) ) ; schema . add ( org . sagebionetworks . repo . model . dbo . dao . table . TableModelTestUtils . createSelectColumn ( 345L , "two" , ColumnType . STRING ) ) ; schema . add ( org . sagebionetworks . repo . model . dbo . dao . table . TableModelTestUtils . createSelectColumn ( 567L , "COUNT(*)" , ColumnType . STRING ) ) ; boolean includeRowIdAndVersion = true ; boolean includeRowEtag = false ; java . lang . String [ ] results = org . sagebionetworks . table . cluster . utils . TableModelUtils . createColumnNameHeader ( schema , includeRowIdAndVersion , includeRowEtag ) ; java . lang . String [ ] expected = new java . lang . String [ ] { ROW_ID , ROW_VERSION , "three" , "two" , "COUNT(*)" } ; "<AssertPlaceHolder>" ; } toString ( java . lang . Long ) { if ( input == null ) { return null ; } return input . toString ( ) ; } | org . junit . Assert . assertEquals ( java . util . Arrays . toString ( expected ) , java . util . Arrays . toString ( results ) ) |
togglesCheckboxButton ( ) { org . eclipse . swtbot . swt . finder . widgets . SWTBotToolbarToggleButton button = bot . toolbarToggleButton ( "Check" ) ; boolean checked = button . isChecked ( ) ; button . toggle ( ) ; "<AssertPlaceHolder>" ; } isChecked ( ) { return syncExec ( new org . eclipse . swtbot . swt . finder . results . BoolResult ( ) { @ org . eclipse . swtbot . swt . finder . widgets . Override public org . eclipse . swtbot . swt . finder . widgets . Boolean run ( ) { return widget . getSelection ( ) ; } } ) ; } | org . junit . Assert . assertTrue ( ( checked != ( button . isChecked ( ) ) ) ) |
testDataStoreNameIsSet ( ) { final org . jbpm . workbench . common . client . list . ListTable < T > currentListGrid = org . jbpm . workbench . common . client . list . AbstractMultiGridViewTest . spy ( new org . jbpm . workbench . common . client . list . ListTable < T > ( new org . uberfire . ext . services . shared . preferences . GridGlobalPreferences ( ) ) ) ; org . jbpm . workbench . common . client . list . AbstractMultiGridViewTest . doAnswer ( new org . mockito . stubbing . Answer ( ) { @ org . jbpm . workbench . common . client . list . Override public org . jbpm . workbench . common . client . list . Void answer ( org . mockito . invocation . InvocationOnMock invocationOnMock ) throws java . lang . Throwable { final java . util . List < org . uberfire . ext . widgets . table . client . ColumnMeta > columns = ( ( java . util . List < org . uberfire . ext . widgets . table . client . ColumnMeta > ) ( invocationOnMock . getArguments ( ) [ 0 ] ) ) ; for ( org . uberfire . ext . widgets . table . client . ColumnMeta columnMeta : columns ) { "<AssertPlaceHolder>" ; } return null ; } } ) . when ( currentListGrid ) . addColumns ( org . jbpm . workbench . common . client . list . AbstractMultiGridViewTest . anyList ( ) ) ; getView ( ) . initColumns ( currentListGrid ) ; verify ( currentListGrid ) . addColumns ( org . jbpm . workbench . common . client . list . AbstractMultiGridViewTest . anyList ( ) ) ; } answer ( org . mockito . invocation . InvocationOnMock ) { final java . util . List < org . uberfire . ext . widgets . table . client . ColumnMeta > columns = ( ( java . util . List < org . uberfire . ext . widgets . table . client . ColumnMeta > ) ( invocationOnMock . getArguments ( ) [ 0 ] ) ) ; for ( org . uberfire . ext . widgets . table . client . ColumnMeta columnMeta : columns ) { org . junit . Assert . assertNotNull ( columnMeta . getColumn ( ) . getDataStoreName ( ) ) ; } return null ; } | org . junit . Assert . assertNotNull ( columnMeta . getColumn ( ) . getDataStoreName ( ) ) |
testRemainingCapacity ( ) { "<AssertPlaceHolder>" ; } remainingCapacity ( ) { return Integer . MAX_VALUE ; } | org . junit . Assert . assertEquals ( Integer . MAX_VALUE , list . remainingCapacity ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.