input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testParsingValuesExcludedFromResMap ( ) { aapt . processValuesFile ( filesystem , java . nio . file . Paths . get ( "sample_resources_3.xml" ) ) ; java . util . Set < com . facebook . buck . android . aapt . AndroidResourceIndexEntry > definitions = ( ( com . facebook . buck . android . aapt . AndroidResourceIndexCollector ) ( aapt . getResourceCollector ( ) ) ) . getResourceIndex ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( segments . length ) == 0 ; }
|
org . junit . Assert . assertTrue ( definitions . isEmpty ( ) )
|
testDownloadFile ( ) { com . pliablematter . cloudstorage . CloudStorage . downloadFile ( bucketName , "test.txt" , destinationDirectory ) ; java . io . File file = new java . io . File ( ( ( destinationDirectory ) + "/test.txt" ) ) ; "<AssertPlaceHolder>" ; } downloadFile ( java . lang . String , java . lang . String , java . lang . String ) { java . io . File directory = new java . io . File ( destinationDirectory ) ; if ( ! ( directory . isDirectory ( ) ) ) { throw new java . lang . Exception ( "Provided<sp>destinationDirectory<sp>path<sp>is<sp>not<sp>a<sp>directory" ) ; } java . io . File file = new java . io . File ( ( ( ( directory . getAbsolutePath ( ) ) + "/" ) + fileName ) ) ; com . google . api . services . storage . Storage storage = com . pliablematter . cloudstorage . CloudStorage . getStorage ( ) ; com . google . api . services . storage . Storage . Objects . Get get = storage . objects ( ) . get ( bucketName , fileName ) ; java . io . FileOutputStream stream = new java . io . FileOutputStream ( file ) ; try { get . executeAndDownloadTo ( stream ) ; } finally { stream . close ( ) ; } }
|
org . junit . Assert . assertTrue ( file . exists ( ) )
|
testFindLinksByDemographic ( ) { int demographicNo1 = 101 ; int demographicNo2 = 202 ; boolean isActive = true ; org . oscarehr . common . model . GroupNoteLink groupNoteLink1 = new org . oscarehr . common . model . GroupNoteLink ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( groupNoteLink1 ) ; groupNoteLink1 . setDemographicNo ( demographicNo1 ) ; groupNoteLink1 . setActive ( isActive ) ; dao . persist ( groupNoteLink1 ) ; org . oscarehr . common . model . GroupNoteLink groupNoteLink2 = new org . oscarehr . common . model . GroupNoteLink ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( groupNoteLink2 ) ; groupNoteLink2 . setDemographicNo ( demographicNo2 ) ; groupNoteLink2 . setActive ( isActive ) ; dao . persist ( groupNoteLink2 ) ; org . oscarehr . common . model . GroupNoteLink groupNoteLink3 = new org . oscarehr . common . model . GroupNoteLink ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( groupNoteLink3 ) ; groupNoteLink3 . setDemographicNo ( demographicNo1 ) ; groupNoteLink3 . setActive ( isActive ) ; dao . persist ( groupNoteLink3 ) ; org . oscarehr . common . model . GroupNoteLink groupNoteLink4 = new org . oscarehr . common . model . GroupNoteLink ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( groupNoteLink4 ) ; groupNoteLink4 . setDemographicNo ( demographicNo1 ) ; groupNoteLink4 . setActive ( ( ! isActive ) ) ; dao . persist ( groupNoteLink4 ) ; java . util . List < org . oscarehr . common . model . GroupNoteLink > expectedResult = new java . util . ArrayList < org . oscarehr . common . model . GroupNoteLink > ( java . util . Arrays . asList ( groupNoteLink1 , groupNoteLink3 ) ) ; java . util . List < org . oscarehr . common . model . GroupNoteLink > result = dao . findLinksByDemographic ( demographicNo1 ) ; org . apache . log4j . Logger logger = org . oscarehr . util . MiscUtils . getLogger ( ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Items<sp>do<sp>not<sp>match." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
|
org . junit . Assert . assertTrue ( true )
|
testNewSynchronousMqttClient ( ) { net . xenqtt . client . MqttClient client = factory . newSynchronousClient ( new net . xenqtt . client . MqttClientFactoryTest . TestMqttClientListener ( ) ) ; "<AssertPlaceHolder>" ; } newSynchronousClient ( net . xenqtt . client . MqttClientListener ) { net . xenqtt . XenqttUtil . validateNotNull ( "mqttClientListener" , mqttClientListener ) ; if ( ! ( synchronous ) ) { throw new java . lang . IllegalStateException ( "You<sp>may<sp>not<sp>create<sp>a<sp>synchronous<sp>client<sp>using<sp>a<sp>client<sp>factory<sp>configured<sp>to<sp>create<sp>asynchronous<sp>clients" ) ; } return new net . xenqtt . client . MqttClientFactory . FactoryClient ( mqttClientListener , null ) ; }
|
org . junit . Assert . assertNotNull ( client )
|
testOutputType ( ) { org . deeplearning4j . nn . conf . layers . CapsuleLayer layer = new org . deeplearning4j . nn . conf . layers . CapsuleLayer . Builder ( 10 , 16 , 5 ) . build ( ) ; org . deeplearning4j . nn . conf . inputs . InputType in1 = org . deeplearning4j . nn . conf . inputs . InputType . recurrent ( 5 , 8 ) ; "<AssertPlaceHolder>" ; } getOutputType ( int , org . deeplearning4j . nn . conf . inputs . InputType ) { return org . deeplearning4j . nn . conf . inputs . InputType . feedForward ( nOut ) ; }
|
org . junit . Assert . assertEquals ( org . deeplearning4j . nn . conf . inputs . InputType . recurrent ( 10 , 16 ) , layer . getOutputType ( 0 , in1 ) )
|
functionCallWithExpressionReference ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = FunctionCall ( "sort" , java . util . Arrays . asList ( ExpressionReference ( Sequence ( Property ( "bar" ) , Property ( "bar" ) ) ) ) ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "sort(&bar.bar)" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( str ) ; }
|
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) )
|
ClaimRef ( ) { java . lang . String input = "<CLREF<sp>ID=\"CLM-00001\"><PDAT>claim<sp>1</PDAT></CLREF>" ; java . lang . String expect = "<a<sp>id=\"CR-0001\"<sp>idref=\"CLM-00001\"<sp>class=\"claim\">claim<sp>1</a>" ; java . lang . String actual = format . getSimpleHtml ( input ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( expect , actual )
|
testGetParametersWithDefaultEntity ( ) { org . lnu . is . domain . order . Order entity = new org . lnu . is . domain . order . Order ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; expected . put ( "userGroups" , groups ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testDestroy ( ) { tested . destroy ( ) ; org . kie . workbench . common . stunner . client . lienzo . components . views . LienzoPanelFocusHandler focusHandler = mock ( org . kie . workbench . common . stunner . client . lienzo . components . views . LienzoPanelFocusHandler . class ) ; tested . focusHandler = focusHandler ; tested . destroy ( ) ; verify ( focusHandler , times ( 1 ) ) . clear ( ) ; "<AssertPlaceHolder>" ; } clear ( ) { commands . clear ( ) ; }
|
org . junit . Assert . assertNull ( tested . focusHandler )
|
notFrozenCheckChildrenNotFrozen ( ) { org . alfresco . service . cmr . repository . NodeRef nodeRef = generateNodeRef ( ) ; when ( mockedHoldService . isHold ( nodeRef ) ) . thenReturn ( false ) ; condition . setCheckChildren ( true ) ; when ( mockedFreezeService . isFrozen ( nodeRef ) ) . thenReturn ( false ) ; when ( mockedFreezeService . hasFrozenChildren ( nodeRef ) ) . thenReturn ( false ) ; "<AssertPlaceHolder>" ; verify ( mockedHoldService , times ( 1 ) ) . isHold ( nodeRef ) ; verify ( mockedFreezeService , times ( 1 ) ) . isFrozen ( nodeRef ) ; verify ( mockedFreezeService , times ( 1 ) ) . hasFrozenChildren ( nodeRef ) ; } evaluate ( org . alfresco . service . cmr . repository . NodeRef ) { return evaluateImpl ( nodeRef ) ; }
|
org . junit . Assert . assertFalse ( condition . evaluate ( nodeRef ) )
|
testAttributeDoesNotChangeOnBlockingNegativeNumbers ( ) { portExtension . portText . setText ( "12345" ) ; portExtension . portText . setText ( "-12345" ) ; "<AssertPlaceHolder>" ; verify ( server ) . setAttribute ( "appEngineDevServerPort" , 12345 ) ; } getText ( ) { return text . getText ( ) ; }
|
org . junit . Assert . assertEquals ( "12345" , portExtension . portText . getText ( ) )
|
testDescribeContents ( ) { io . github . data4all . model . data . Track track = new io . github . data4all . model . data . Track ( ) ; "<AssertPlaceHolder>" ; } describeContents ( ) { return 0 ; }
|
org . junit . Assert . assertTrue ( ( ( track . describeContents ( ) ) == 0 ) )
|
testSerialization ( ) { java . awt . GradientPaint gp = new java . awt . GradientPaint ( 1.0F , 2.0F , java . awt . Color . RED , 3.0F , 4.0F , java . awt . Color . BLUE ) ; org . jfree . chart . block . LabelBlock b1 = new org . jfree . chart . block . LabelBlock ( "ABC" , new java . awt . Font ( "Dialog" , java . awt . Font . PLAIN , 12 ) , gp ) ; org . jfree . chart . block . LabelBlock b2 = ( ( org . jfree . chart . block . LabelBlock ) ( org . jfree . chart . TestUtils . serialised ( b1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( b1 , b2 )
|
testEqualsWithEqual ( ) { au . gov . ga . earthsci . common . color . ColorMap map1 = new au . gov . ga . earthsci . common . color . ColorMap ( "name" , null , au . gov . ga . earthsci . common . color . ColorMapTest . PERCENTAGE_ENTRIES , null , au . gov . ga . earthsci . common . color . ColorMap . InterpolationMode . NEAREST_MATCH , false ) ; au . gov . ga . earthsci . common . color . ColorMap map2 = new au . gov . ga . earthsci . common . color . ColorMap ( "name" , null , au . gov . ga . earthsci . common . color . ColorMapTest . PERCENTAGE_ENTRIES , null , au . gov . ga . earthsci . common . color . ColorMap . InterpolationMode . NEAREST_MATCH , false ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return ( object == null ) || ( object == ( this ) ) ; }
|
org . junit . Assert . assertTrue ( map1 . equals ( map2 ) )
|
testCalculateChebyshev2Prototype ( ) { org . jdsp . iirfilterdesigner . model . FilterZerosPolesGain zpk1 = iirdesigner . calculatePrototype ( 3 , 3 ) ; org . apache . commons . math . complex . Complex [ ] zeros = new org . apache . commons . math . complex . Complex [ ] { new org . apache . commons . math . complex . Complex ( 0.0 , ( - 1.15470054 ) ) , new org . apache . commons . math . complex . Complex ( 0.0 , 1.15470054 ) } ; org . apache . commons . math . complex . Complex [ ] poles = new org . apache . commons . math . complex . Complex [ ] { new org . apache . commons . math . complex . Complex ( ( - 0.17737632 ) , ( - 1.07757832 ) ) , new org . apache . commons . math . complex . Complex ( ( - 3.36188451 ) , ( - 1.44406328E-15 ) ) , new org . apache . commons . math . complex . Complex ( ( - 0.17737632 ) , 1.07757832 ) } ; org . jdsp . iirfilterdesigner . model . FilterZerosPolesGain zpk2 = new org . jdsp . iirfilterdesigner . model . FilterZerosPolesGain ( zeros , poles , 3.0071318790228005 ) ; "<AssertPlaceHolder>" ; } calculatePrototype ( int , double ) { double epsilon = java . lang . Math . sqrt ( ( ( java . lang . Math . pow ( 10 , ( 0.1 * gpass ) ) ) - 1.0 ) ) ; double mu = ( 1.0 / filterOrder ) * ( java . lang . Math . log ( ( ( 1.0 + ( java . lang . Math . sqrt ( ( 1.0 + ( epsilon * epsilon ) ) ) ) ) / epsilon ) ) ) ; org . apache . commons . math . complex . Complex [ ] poles = new org . apache . commons . math . complex . Complex [ filterOrder ] ; double theta ; for ( int i = 1 ; i <= filterOrder ; i ++ ) { theta = ( ( ( Math . PI ) / 2.0 ) * ( ( 2 * i ) - 1.0 ) ) / filterOrder ; poles [ ( i - 1 ) ] = new org . apache . commons . math . complex . Complex ( ( ( - ( java . lang . Math . sinh ( mu ) ) ) * ( java . lang . Math . sin ( theta ) ) ) , ( ( java . lang . Math . cosh ( mu ) ) * ( java . lang . Math . cos ( theta ) ) ) ) ; } org . apache . commons . math . complex . Complex product = new org . apache . commons . math . complex . Complex ( 1.0 , 0.0 ) ; for ( int i = 0 ; i < ( poles . length ) ; i ++ ) product = product . multiply ( poles [ i ] . negate ( ) ) ; double gain = product . getReal ( ) ; if ( org . jdsp . iirfilterdesigner . math . SpecialMath . isEven ( filterOrder ) ) gain = gain / ( java . lang . Math . sqrt ( ( 1 + ( epsilon * epsilon ) ) ) ) ; org . jdsp . iirfilterdesigner . model . FilterZerosPolesGain zpk = new org . jdsp . iirfilterdesigner . model . FilterZerosPolesGain ( new org . apache . commons . math . complex . Complex [ 0 ] , poles , gain ) ; return zpk ; }
|
org . junit . Assert . assertEquals ( zpk1 , zpk2 )
|
testFormalNumber ( ) { org . openscience . cdk . interfaces . IAtom atom = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; org . openscience . cdk . interfaces . IAtomContainer container = mock ( org . openscience . cdk . interfaces . IAtomContainer . class ) ; org . openscience . cdk . hash . AtomEncoder encoder = org . openscience . cdk . hash . BasicAtomEncoder . FORMAL_CHARGE ; when ( atom . getFormalCharge ( ) ) . thenReturn ( ( - 2 ) ) ; "<AssertPlaceHolder>" ; verify ( atom , times ( 1 ) ) . getFormalCharge ( ) ; verifyNoMoreInteractions ( atom , container ) ; } encode ( long [ ] , long [ ] ) { boolean modified = left . encode ( current , next ) ; return ( right . encode ( current , next ) ) || modified ; }
|
org . junit . Assert . assertThat ( encoder . encode ( atom , container ) , org . hamcrest . CoreMatchers . is ( ( - 2 ) ) )
|
testClientArea_withTextInItem_bottom ( ) { folder = new org . eclipse . swt . widgets . TabFolder ( shell , org . eclipse . swt . SWT . BOTTOM ) ; folder . setSize ( 100 , 200 ) ; org . eclipse . swt . widgets . TabItem item = new org . eclipse . swt . widgets . TabItem ( folder , org . eclipse . swt . SWT . NONE ) ; item . setText ( "Item" ) ; org . eclipse . swt . graphics . Rectangle expected = new org . eclipse . swt . graphics . Rectangle ( 1 , 1 , 98 , 168 ) ; "<AssertPlaceHolder>" ; } getClientArea ( ) { return clientComposite . getClientArea ( ) ; }
|
org . junit . Assert . assertEquals ( expected , folder . getClientArea ( ) )
|
generateInsertStatement ( ) { java . lang . String expected = "INSERT<sp>INTO<sp>TARGET_TABLE<sp>(a,b)<sp>VALUES<sp>('java','tengah')" ; com . airhacks . enhydrator . in . Row row = getEntries ( ) ; java . lang . String actual = this . cut . generateInsertStatement ( row ) ; "<AssertPlaceHolder>" ; } generateInsertStatement ( com . airhacks . enhydrator . in . Row ) { return ( ( ( ( ( "INSERT<sp>INTO<sp>" + ( this . targetTable ) ) + "<sp>(" ) + ( com . airhacks . enhydrator . out . JDBCSink . columnList ( entries ) ) ) + ")<sp>VALUES<sp>(" ) + ( com . airhacks . enhydrator . out . JDBCSink . valueList ( entries ) ) ) + ")" ; }
|
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) )
|
concurrentSyncSensorsMetadata ( ) { org . springframework . test . util . ReflectionTestUtils . setField ( service , "syncSensorsIsRunning" , Boolean . TRUE ) ; service . syncSensorsMetadata ( ) ; final boolean syncSensorsIsRunning = ( ( java . lang . Boolean ) ( org . springframework . test . util . ReflectionTestUtils . getField ( service , "syncSensorsIsRunning" ) ) ) ; "<AssertPlaceHolder>" ; verify ( mongoOps , times ( 0 ) ) . count ( any ( org . springframework . data . mongodb . core . query . Query . class ) , eq ( org . sentilo . web . catalog . domain . Sensor . class ) ) ; } syncSensorsMetadata ( ) { if ( syncSensorsIsRunning ) { org . sentilo . web . catalog . admin . service . impl . SynchronizationServiceImpl . LOGGER . warn ( "Previous<sp>sync<sp>sensors<sp>job<sp>is<sp>already<sp>running!" ) ; return ; } try { final long startTime = java . lang . System . currentTimeMillis ( ) ; syncSensorsIsRunning = true ; final int resourcesSync = syncResourcesMetadata ( org . sentilo . web . catalog . domain . Sensor . class , "providerId" , "sensorId" , "state" , "ttl" ) ; if ( resourcesSync > 0 ) { org . sentilo . web . catalog . admin . service . impl . SynchronizationServiceImpl . LOGGER . info ( "Process<sp>finished.<sp>{}<sp>sensors<sp>synchronized<sp>in<sp>{}<sp>ms" , resourcesSync , ( ( java . lang . System . currentTimeMillis ( ) ) - startTime ) ) ; } } catch ( final java . lang . Exception e ) { org . sentilo . web . catalog . admin . service . impl . SynchronizationServiceImpl . LOGGER . error ( "Sync<sp>process<sp>aborted<sp>due<sp>to<sp>an<sp>error<sp>(it<sp>will<sp>restart<sp>shortly):<sp>{}<sp>" , e . getMessage ( ) , e ) ; } finally { syncSensorsIsRunning = false ; } }
|
org . junit . Assert . assertTrue ( syncSensorsIsRunning )
|
testGetParametersWithDefaultEntityWithDisbledStatus ( ) { unit . setActive ( false ) ; org . lnu . is . domain . married . type . MarriedType entity = new org . lnu . is . domain . married . type . MarriedType ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "userGroups" , groups ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testCollectionNotMemberOfToOne ( ) { java . lang . String ejbql = "SELECT<sp>a" + ( "<sp>FROM<sp>Address<sp>a<sp>JOIN<sp>a.toEmployee<sp>m<sp>JOIN<sp>m.toDepartment<sp>d" + "<sp>WHERE<sp>m<sp>NOT<sp>MEMBER<sp>d.employees" ) ; org . apache . cayenne . query . EJBQLQuery query = new org . apache . cayenne . query . EJBQLQuery ( ejbql ) ; java . util . List < ? > objects = context . performQuery ( query ) ; "<AssertPlaceHolder>" ; } size ( ) { return neighbors . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , objects . size ( ) )
|
testGetViewTypeMaskBothNotNull ( ) { org . sagebionetworks . repo . model . table . ViewType viewType = ViewType . file_and_table ; java . lang . Long viewTypeMask = ViewTypeMask . File . getMask ( ) ; long result = org . sagebionetworks . repo . model . table . ViewTypeMask . getViewTypeMask ( viewType , viewTypeMask ) ; "<AssertPlaceHolder>" ; } getMask ( ) { return this . bitMask ; }
|
org . junit . Assert . assertEquals ( ViewTypeMask . File . getMask ( ) , result )
|
testGetSourceClusterName ( ) { java . util . Map < java . lang . String , java . lang . String > props = new java . util . HashMap ( ) ; org . apache . ambari . server . controller . ivory . Feed feed = new org . apache . ambari . server . controller . ivory . Feed ( "Feed1" , "d" , "s" , "sch" , "source" , "st" , "end" , "l" , "a" , "target" , "st" , "end" , "l" , "a" , props ) ; "<AssertPlaceHolder>" ; } getSourceClusterName ( ) { return sourceClusterName ; }
|
org . junit . Assert . assertEquals ( "source" , feed . getSourceClusterName ( ) )
|
testExceptionNoArgConstructor ( ) { org . finra . herd . model . ObjectNotFoundException exception = new org . finra . herd . model . ObjectNotFoundException ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( ( ( exception . getMessage ( ) ) == null ) )
|
field_comparison_returns_true_when_expression_true ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'field':'field4','op':'>','rfield':'field3'}" ) ; com . redhat . lightblue . eval . QueryEvaluator qe = com . redhat . lightblue . eval . QueryEvaluator . getInstance ( q , md ) ; com . redhat . lightblue . eval . QueryEvaluationContext ctx = qe . evaluate ( jsonDoc ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return result ; }
|
org . junit . Assert . assertTrue ( ctx . getResult ( ) )
|
evaluateDecisionTreeIris ( ) { org . jpmml . rapidminer . Batch batch = new org . jpmml . rapidminer . RapidMinerBatch ( "DecisionTree" , "Iris" ) ; "<AssertPlaceHolder>" ; } evaluate ( org . jpmml . evaluator . Batch ) { org . jpmml . evaluator . PMML pmml = org . jpmml . evaluator . IOUtil . unmarshal ( batch . getModel ( ) ) ; org . jpmml . evaluator . PMMLManager pmmlManager = new org . jpmml . evaluator . PMMLManager ( pmml ) ; org . jpmml . evaluator . ModelManager < ? > modelManager = pmmlManager . getModelManager ( null , org . jpmml . evaluator . ModelEvaluatorFactory . getInstance ( ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > > input = org . jpmml . evaluator . CsvUtil . load ( batch . getInput ( ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > > output = org . jpmml . evaluator . CsvUtil . load ( batch . getOutput ( ) ) ; org . jpmml . evaluator . Evaluator evaluator = ( ( org . jpmml . evaluator . Evaluator ) ( modelManager ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . Object > > table = org . jpmml . evaluator . Lists . newArrayList ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > activeFields = evaluator . getActiveFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > groupFields = evaluator . getGroupFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > predictedFields = evaluator . getPredictedFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > outputFields = evaluator . getOutputFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > inputFields = org . jpmml . evaluator . Lists . newArrayList ( ) ; inputFields . addAll ( activeFields ) ; inputFields . addAll ( groupFields ) ; for ( int i = 0 ; i < ( input . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > inputRow = input . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . Object > arguments = org . jpmml . evaluator . Maps . newLinkedHashMap ( ) ; for ( org . jpmml . evaluator . FieldName inputField : inputFields ) { java . lang . String inputCell = inputRow . get ( inputField ) ; java . lang . Object inputValue = evaluator . prepare ( inputField , inputCell ) ; arguments . put ( inputField , inputValue ) ; } table . add ( arguments ) ; } if ( ( groupFields . size ( ) ) == 1 ) { org . jpmml . evaluator . FieldName groupField = groupFields . get ( 0 ) ; table = org . jpmml . evaluator . EvaluatorUtil . groupRows ( groupField , table ) ; } else if ( ( groupFields . size ( ) ) > 1 ) { throw new org . jpmml . evaluator . EvaluationException ( ) ; } if ( output . isEmpty ( ) ) { for ( int i = 0 ; i < ( table . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > arguments = table . get ( i ) ; evaluator . evaluate ( arguments ) ; } return true ; } else { if ( ( table . size ( ) ) != ( output . size ( ) ) ) { throw new org . jpmml . evaluator . EvaluationException ( ) ; } boolean success = true ; for ( int i = 0 ; i < ( output . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > outputRow = output . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > arguments = table . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > result = evaluator . evaluate ( arguments ) ; for ( org . jpmml . evaluator . FieldName predictedField : predictedFields ) { java . lang . String outputCell = outputRow . get ( predictedField ) ; java . lang . Object predictedValue = org . jpmml . evaluator . EvaluatorUtil . decode ( result . get ( predictedField ) ) ; success &= org . jpmml . evaluator . BatchUtil . acceptable ( outputCell , predictedValue ) ; } for ( org . jpmml . evaluator . FieldName outputField : outputFields ) { java . lang . String outputCell = outputRow . get ( outputField ) ; java . lang . Object computedValue = result . get ( outputField ) ; success &= ( outputCell != null ) ? org . jpmml . evaluator . BatchUtil . acceptable ( outputCell , computedValue
|
org . junit . Assert . assertTrue ( org . jpmml . rapidminer . BatchUtil . evaluate ( batch ) )
|
testIMax2Of3d ( ) { double [ ] [ ] [ ] slices = new double [ 3 ] [ ] [ ] ; slices [ 0 ] = new double [ ] [ ] { new double [ ] { 1 , 10 , 2 } , new double [ ] { 3 , 4 , 5 } } ; slices [ 1 ] = new double [ ] [ ] { new double [ ] { - 10 , - 9 , - 8 } , new double [ ] { - 7 , - 6 , - 5 } } ; slices [ 2 ] = new double [ ] [ ] { new double [ ] { 4 , 3 , 2 } , new double [ ] { 1 , 0 , - 1 } } ; double [ ] imax = new double [ ] { 1 , 5 , 0 } ; org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . create ( 3 , 2 , 3 ) ; for ( int i = 0 ; i < 3 ; i ++ ) { arr . get ( org . nd4j . linalg . indexing . NDArrayIndex . point ( i ) , org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org . nd4j . linalg . indexing . NDArrayIndex . all ( ) ) . assign ( org . nd4j . linalg . factory . Nd4j . create ( slices [ i ] ) ) ; } org . nd4j . linalg . api . ndarray . INDArray out = org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . api . ops . impl . indexaccum . IMax ( arr ) , 1 , 2 ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . create ( imax ) ; "<AssertPlaceHolder>" ; } create ( float [ ] ) { return org . nd4j . linalg . factory . Nd4j . create ( data , org . nd4j . linalg . factory . Nd4j . order ( ) ) ; }
|
org . junit . Assert . assertEquals ( exp , out )
|
testLargeEWAHCompressedBitmap ( ) { System . out . println ( "testing<sp>EWAH<sp>over<sp>a<sp>large<sp>array" ) ; com . googlecode . javaewah32 . EWAHCompressedBitmap32 myarray1 = new com . googlecode . javaewah32 . EWAHCompressedBitmap32 ( ) ; int N = 11000000 ; for ( int i = 0 ; i < N ; ++ i ) { myarray1 . set ( i ) ; } "<AssertPlaceHolder>" ; } sizeInBits ( ) { return this . sizeInBits ; }
|
org . junit . Assert . assertTrue ( ( ( myarray1 . sizeInBits ( ) ) == N ) )
|
testSerialization ( ) { org . jfree . chart . renderer . category . AreaRenderer r1 = new org . jfree . chart . renderer . category . AreaRenderer ( ) ; org . jfree . chart . renderer . category . AreaRenderer r2 = ( ( org . jfree . chart . renderer . category . AreaRenderer ) ( org . jfree . chart . TestUtils . serialised ( r1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( r1 , r2 )
|
testParseTimeInfoHandbrake ( ) { System . out . println ( "parseTimeInfoHandbrake" ) ; java . lang . String line = "THIS<sp>IS<sp>FAKE<sp>,<sp>12.23<sp>%<sp>I<sp>LIKE<sp>CHOCOLATE" ; com . bixly . pastevid . screencap . components . progressbar . FFMpegProgressBarListener instance = new com . bixly . pastevid . screencap . components . progressbar . FFMpegProgressBarListener ( com . bixly . pastevid . screencap . components . progressbar . FFMpegProgressBarListenerTest . jprogressbar , 1 ) ; instance . parseTimeInfoHandbrake ( line ) ; "<AssertPlaceHolder>" ; } getProgress ( ) { return ( ( int ) ( ( ( double ) ( ( this . seconds ) * 100 ) ) / ( ( double ) ( this . duration ) ) ) ) ; }
|
org . junit . Assert . assertEquals ( instance . getProgress ( ) , 12 )
|
testConcat ( ) { int [ ] concatDim = new int [ ] { 0 , 0 , 0 } ; org . nd4j . autodiff . opvalidation . List < org . nd4j . autodiff . opvalidation . List < int [ ] > > origShapes = new org . nd4j . autodiff . opvalidation . ArrayList ( ) ; origShapes . add ( org . nd4j . autodiff . opvalidation . Arrays . asList ( new int [ ] { 3 , 4 } , new int [ ] { 5 , 4 } ) ) ; origShapes . add ( org . nd4j . autodiff . opvalidation . Arrays . asList ( new int [ ] { 1 , 2 , 3 } , new int [ ] { 1 , 2 , 3 } , new int [ ] { 2 , 2 , 3 } ) ) ; origShapes . add ( org . nd4j . autodiff . opvalidation . Arrays . asList ( new int [ ] { 1 , 2 , 3 , 4 } , new int [ ] { 2 , 2 , 3 , 4 } ) ) ; org . nd4j . autodiff . opvalidation . List < java . lang . String > failed = new org . nd4j . autodiff . opvalidation . ArrayList ( ) ; for ( int i = 0 ; i < ( concatDim . length ) ; i ++ ) { org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . opvalidation . List < int [ ] > shapes = origShapes . get ( i ) ; org . nd4j . autodiff . samediff . SDVariable [ ] toConcat = new org . nd4j . autodiff . samediff . SDVariable [ shapes . size ( ) ] ; org . nd4j . linalg . api . ndarray . INDArray [ ] orig = new org . nd4j . linalg . api . ndarray . INDArray [ shapes . size ( ) ] ; for ( int j = 0 ; j < ( shapes . size ( ) ) ; j ++ ) { orig [ j ] = org . nd4j . linalg . factory . Nd4j . rand ( DataType . DOUBLE , shapes . get ( j ) ) ; toConcat [ j ] = sd . var ( ( "concat-in-" + ( java . lang . String . valueOf ( j ) ) ) , orig [ j ] ) ; } org . nd4j . autodiff . samediff . SDVariable sdConcat = sd . concat ( "c" , 0 , toConcat ) ; org . nd4j . autodiff . samediff . SDVariable stdev = sd . standardDeviation ( "out" , sdConcat , true ) ; java . lang . String msg = ( ( "i=" + i ) + ",<sp>concatDim=" ) + ( concatDim [ i ] ) ; org . nd4j . autodiff . validation . TestCase tc = new org . nd4j . autodiff . validation . TestCase ( sd ) ; tc . testName ( msg ) . expectedOutput ( "c" , org . nd4j . linalg . factory . Nd4j . concat ( concatDim [ i ] , orig ) ) ; java . lang . String error = org . nd4j . autodiff . validation . OpValidation . validate ( tc ) ; if ( error != null ) { failed . add ( name ) ; } } "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder buff = new java . lang . StringBuilder ( "[" ) ; int sz = objects . size ( ) ; int i ; for ( i = 0 ; i < sz ; i ++ ) { java . lang . Object e = objects . get ( i ) ; buff . append ( e ) ; if ( i < ( sz - 1 ) ) buff . append ( "<sp>,<sp>" ) ; } buff . append ( "]" ) ; return buff . toString ( ) ; }
|
org . junit . Assert . assertEquals ( failed . toString ( ) , 0 , failed . size ( ) )
|
testSendRequestMessageWithSuccess ( ) { class ResponseThread extends java . lang . Thread { private java . util . concurrent . ConcurrentHashMap < java . lang . Integer , java . util . concurrent . SynchronousQueue < org . o3project . odenos . remoteobject . message . Response > > responseMap ; public org . o3project . odenos . remoteobject . message . Response response ; public ResponseThread ( java . util . concurrent . ConcurrentHashMap < java . lang . Integer , java . util . concurrent . SynchronousQueue < org . o3project . odenos . remoteobject . message . Response > > responseMap , org . o3project . odenos . remoteobject . message . Response response ) { this . responseMap = responseMap ; this . response = response ; } public void run ( ) { try { java . lang . Thread . sleep ( 100 ) ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; } java . util . concurrent . SynchronousQueue < org . o3project . odenos . remoteobject . message . Response > rendezvous = this . responseMap . remove ( 0 ) ; try { rendezvous . offer ( this . response , 30 , TimeUnit . SECONDS ) ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; } } } org . o3project . odenos . remoteobject . message . Response mockResponse = org . mockito . Mockito . mock ( org . o3project . odenos . remoteobject . message . Response . class ) ; java . util . concurrent . ConcurrentHashMap < java . lang . Integer , java . util . concurrent . SynchronousQueue < org . o3project . odenos . remoteobject . message . Response > > responseMap = ( ( java . util . concurrent . ConcurrentHashMap < java . lang . Integer , java . util . concurrent . SynchronousQueue < org . o3project . odenos . remoteobject . message . Response > > ) ( org . powermock . reflect . Whitebox . getInternalState ( target , "responseMap" ) ) ) ; ResponseThread responseThread = new ResponseThread ( responseMap , mockResponse ) ; org . o3project . odenos . remoteobject . message . Request mockRequest = org . mockito . Mockito . mock ( org . o3project . odenos . remoteobject . message . Request . class ) ; responseThread . start ( ) ; org . o3project . odenos . remoteobject . message . Response resp = target . sendRequest ( mockRequest ) ; "<AssertPlaceHolder>" ; } sendRequest ( org . o3project . odenos . remoteobject . message . Request ) { return sendRequest ( request , null ) ; }
|
org . junit . Assert . assertThat ( resp , org . hamcrest . CoreMatchers . is ( mockResponse ) )
|
testGetLinks_StringNull ( ) { org . matsim . api . core . v01 . network . Network network = getTestNetwork ( ) ; java . util . List < org . matsim . api . core . v01 . network . Link > links = org . matsim . core . network . NetworkUtils . getLinks ( network , ( ( java . lang . String ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return hm . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , links . size ( ) )
|
testGetURL ( ) { java . net . URL url = com . intel . mtwilson . util . ResourceFinder . getURL ( "config/test1.txt" ) ; "<AssertPlaceHolder>" ; } getURL ( java . lang . String ) { java . net . URL relativeClasspathResource = com . intel . mtwilson . util . ResourceFinder . class . getResource ( filename ) ; if ( relativeClasspathResource != null ) { return relativeClasspathResource ; } java . net . URL absoluteClasspathResource = com . intel . mtwilson . util . ResourceFinder . class . getResource ( ( "/" + filename ) ) ; if ( absoluteClasspathResource != null ) { return absoluteClasspathResource ; } try { java . io . File f = com . intel . mtwilson . util . ResourceFinder . getFile ( filename ) ; return f . toURI ( ) . toURL ( ) ; } catch ( java . net . MalformedURLException ex ) { com . intel . mtwilson . util . ResourceFinder . log . error ( ( "Invalid<sp>path<sp>or<sp>URL:<sp>" + filename ) , ex ) ; } throw new java . io . FileNotFoundException ( ( "Cannot<sp>find<sp>" + filename ) ) ; }
|
org . junit . Assert . assertNotNull ( url )
|
runTest ( ) { boolean result = checkNoError ( "Social_ActivityStreams_Post_Event_Using_Populator" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; }
|
org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result )
|
testToEnumeration ( ) { java . util . Map < java . lang . Object , java . lang . Object > map = newLinkedHashMap ( ) ; map . put ( "jinxin" , 1 ) ; map . put ( 2 , 2 ) ; map . put ( "" , 3 ) ; map . put ( 4 , 4 ) ; map . put ( "jinxin1" , 1 ) ; java . util . Enumeration < java . lang . Object > enumeration = com . feilong . core . bean . ConvertUtil . toEnumeration ( map . keySet ( ) ) ; java . util . List < java . lang . Object > list = com . feilong . core . bean . ConvertUtil . toList ( enumeration ) ; "<AssertPlaceHolder>" ; } toList ( java . util . Enumeration ) { return null == enumeration ? java . util . Collections . < T > emptyList ( ) : java . util . Collections . list ( enumeration ) ; }
|
org . junit . Assert . assertThat ( list , org . hamcrest . Matchers . contains ( ( ( java . lang . Object ) ( "jinxin" ) ) , 2 , "" , 4 , "jinxin1" ) )
|
testGetSetEndPointType ( ) { com . microsoft . windowsazure . services . media . models . EndPointType expectedEndPointType = EndPointType . AzureQueue ; com . microsoft . windowsazure . services . media . models . NotificationEndPointInfo notificationEndPointInfo = new com . microsoft . windowsazure . services . media . models . NotificationEndPointInfo ( null , new com . microsoft . windowsazure . services . media . implementation . content . NotificationEndPointType ( ) . setEndPointType ( expectedEndPointType . getCode ( ) ) ) ; com . microsoft . windowsazure . services . media . models . EndPointType actualEndPointType = notificationEndPointInfo . getEndPointType ( ) ; "<AssertPlaceHolder>" ; } getEndPointType ( ) { return this . endPointType ; }
|
org . junit . Assert . assertEquals ( expectedEndPointType , actualEndPointType )
|
should_upload_file_to_ftp_server ( ) { final java . io . File file = folder . newFile ( org . arquillian . cube . containerobject . FtpClientIT . REMOTE_FILENAME ) ; java . nio . file . Files . write ( file . toPath ( ) , "Hello<sp>World" . getBytes ( ) ) ; org . arquillian . cube . containerobject . FtpClient ftpClient = new org . arquillian . cube . containerobject . FtpClient ( ftpContainer . getIp ( ) , ftpContainer . getBindPort ( ) , ftpContainer . getUsername ( ) , ftpContainer . getPassword ( ) ) ; try { ftpClient . uploadFile ( file , org . arquillian . cube . containerobject . FtpClientIT . REMOTE_FILENAME ) ; } finally { ftpClient . disconnect ( ) ; } final boolean filePresentInContainer = ftpContainer . isFilePresentInContainer ( org . arquillian . cube . containerobject . FtpClientIT . REMOTE_FILENAME ) ; "<AssertPlaceHolder>" ; } isFilePresentInContainer ( java . lang . String ) { try ( final java . io . InputStream file = dockerClient . copyArchiveFromContainerCmd ( "ftp" , ( "/ftp/" + filename ) ) . exec ( ) ) { return file != null ; } catch ( java . lang . Exception e ) { return false ; } }
|
org . junit . Assert . assertThat ( filePresentInContainer , org . hamcrest . CoreMatchers . is ( true ) )
|
testXpath ( ) { org . omg . bpmn . miwg . api . AnalysisJob job = new org . omg . bpmn . miwg . api . AnalysisJob ( org . omg . bpmn . miwg . api . Consts . REFERENCE_DIR , "B.2.0" , org . omg . bpmn . miwg . api . Variant . Reference , org . omg . bpmn . miwg . facade . test . references . Reference_B_2_0_Test . REFERENCE_INPUT ) ; job . setXpathOnly ( ) ; org . omg . bpmn . miwg . api . AnalysisOutput result = org . omg . bpmn . miwg . facade . AnalysisFacade . executeAnalysisJob ( job ) . getResult ( org . omg . bpmn . miwg . xpath . XpathAnalysisTool . class ) ; "<AssertPlaceHolder>" ; } numFindings ( ) { return numFindings ; }
|
org . junit . Assert . assertEquals ( 0 , result . numFindings ( ) )
|
testNewOAuthFlowsObject ( ) { com . ibm . ws . microprofile . openapi . impl . validation . OAuthFlowsValidator validator = com . ibm . ws . microprofile . openapi . impl . validation . OAuthFlowsValidator . getInstance ( ) ; com . ibm . ws . microprofile . openapi . test . utils . TestValidationHelper vh = new com . ibm . ws . microprofile . openapi . test . utils . TestValidationHelper ( ) ; com . ibm . ws . microprofile . openapi . impl . model . security . OAuthFlowsImpl oauthflows = new com . ibm . ws . microprofile . openapi . impl . model . security . OAuthFlowsImpl ( ) ; validator . validate ( vh , context , oauthflows ) ; "<AssertPlaceHolder>" ; } getEventsSize ( ) { return result . getEvents ( ) . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , vh . getEventsSize ( ) )
|
testRemoveMultipleToEmpty ( ) { org . hipparchus . stat . regression . SimpleRegression regression = new org . hipparchus . stat . regression . SimpleRegression ( ) ; regression . addData ( removeMultiple ) ; regression . removeData ( removeMultiple ) ; "<AssertPlaceHolder>" ; } getN ( ) { return n ; }
|
org . junit . Assert . assertEquals ( regression . getN ( ) , 0 )
|
optional_double_getAsDouble ( ) { java . util . OptionalDouble optionalDouble = java . util . OptionalDouble . of ( 90 ) ; "<AssertPlaceHolder>" ; } getAsDouble ( ) { return 10 ; }
|
org . junit . Assert . assertEquals ( 90 , optionalDouble . getAsDouble ( ) , 0 )
|
readHalfPositiveZero ( ) { final byte [ ] data = new byte [ ] { 0 , 0 } ; final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( data ) ; final com . flagstone . transform . coder . SWFDecoder fixture = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; "<AssertPlaceHolder>" ; } readHalf ( ) { final int bits = readUnsignedShort ( ) ; final int sign = ( bits > > ( com . flagstone . transform . coder . SWFDecoder . HALF_SIGN_SHIFT ) ) & ( Coder . BIT0 ) ; int exp = ( bits > > ( com . flagstone . transform . coder . SWFDecoder . HALF_EXP_SHIFT ) ) & ( Coder . LOWEST5 ) ; int mantissa = bits & ( Coder . LOWEST10 ) ; float value ; if ( exp == 0 ) { if ( mantissa == 0 ) { value = java . lang . Float . intBitsToFloat ( ( sign << ( com . flagstone . transform . coder . SWFDecoder . SIGN_SHIFT ) ) ) ; } else { while ( ( mantissa & ( Coder . BIT10 ) ) == 0 ) { mantissa <<= 1 ; exp -= 1 ; } exp += 1 ; exp = exp + ( ( com . flagstone . transform . coder . SWFDecoder . EXP_MAX ) - ( com . flagstone . transform . coder . SWFDecoder . HALF_EXP_OFFSET ) ) ; mantissa &= ~ ( Coder . BIT10 ) ; mantissa = mantissa << ( com . flagstone . transform . coder . SWFDecoder . MANT_SHIFT ) ; value = java . lang . Float . intBitsToFloat ( ( ( ( sign << ( com . flagstone . transform . coder . SWFDecoder . SIGN_SHIFT ) ) | ( exp << ( com . flagstone . transform . coder . SWFDecoder . EXP_SHIFT ) ) ) | mantissa ) ) ; } } else if ( exp == ( com . flagstone . transform . coder . SWFDecoder . HALF_EXP_MAX ) ) { if ( mantissa == 0 ) { value = java . lang . Float . intBitsToFloat ( ( ( sign << ( com . flagstone . transform . coder . SWFDecoder . SIGN_SHIFT ) ) | ( com . flagstone . transform . coder . SWFDecoder . INFINITY ) ) ) ; } else { value = java . lang . Float . intBitsToFloat ( ( ( ( sign << ( com . flagstone . transform . coder . SWFDecoder . SIGN_SHIFT ) ) | ( com . flagstone . transform . coder . SWFDecoder . INFINITY ) ) | ( mantissa << ( com . flagstone . transform . coder . SWFDecoder . MANT_SHIFT ) ) ) ) ; } } else { exp = exp + ( ( com . flagstone . transform . coder . SWFDecoder . EXP_MAX ) - ( com . flagstone . transform . coder . SWFDecoder . HALF_EXP_OFFSET ) ) ; mantissa = mantissa << ( com . flagstone . transform . coder . SWFDecoder . MANT_SHIFT ) ; value = java . lang . Float . intBitsToFloat ( ( ( ( sign << ( com . flagstone . transform . coder . SWFDecoder . SIGN_SHIFT ) ) | ( exp << ( com . flagstone . transform . coder . SWFDecoder . EXP_SHIFT ) ) ) | mantissa ) ) ; } return value ; }
|
org . junit . Assert . assertEquals ( 0.0 , fixture . readHalf ( ) , 0.0 )
|
subSupNonUnicode ( ) { java . lang . String input = "<subscript>Z+1</subscript><sp><superscript>Z<sp>-<sp>1</superscript>" ; java . lang . String expect = "<sub>Z+1</sub><sp><sup>Z<sp>-<sp>1</sup>" ; java . lang . String actual = format . getSimpleHtml ( input ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( expect , actual )
|
testJoinCartesian ( ) { final org . apache . calcite . tools . RelBuilder builder = org . apache . calcite . tools . RelBuilder . create ( org . apache . calcite . test . RelBuilderTest . config ( ) . build ( ) ) ; org . apache . calcite . rel . RelNode root = builder . scan ( "EMP" ) . scan ( "DEPT" ) . join ( JoinRelType . INNER ) . build ( ) ; final java . lang . String expected = "LogicalJoin(condition=[true],<sp>joinType=[inner])\n" + ( "<sp>LogicalTableScan(table=[[scott,<sp>EMP]])\n" + "<sp>LogicalTableScan(table=[[scott,<sp>DEPT]])\n" ) ; "<AssertPlaceHolder>" ; } hasTree ( java . lang . String ) { return org . apache . calcite . test . Matchers . compose ( org . hamcrest . core . Is . is ( value ) , ( input ) -> { return org . apache . calcite . util . Util . toLinux ( org . apache . calcite . plan . RelOptUtil . toString ( input ) ) ; } ) ; }
|
org . junit . Assert . assertThat ( root , org . apache . calcite . test . Matchers . hasTree ( expected ) )
|
shouldLogErrorMessage ( ) { logger . error ( msg ) ; verify ( innerLogger , times ( 1 ) ) . error ( eq ( io . confluent . common . logging . StructuredLoggerImplTest . LOG_MSG ) , captor . capture ( ) ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return schemaAndValue ; }
|
org . junit . Assert . assertThat ( captor . getValue ( ) . getMessage ( ) , org . hamcrest . CoreMatchers . is ( msg ) )
|
testTopoSortWithInputs ( ) { edu . jhu . prim . util . random . Prng . seed ( 1L ) ; java . util . List < java . lang . String > valid = java . util . Arrays . asList ( new java . lang . String [ ] { "[11,<sp>2,<sp>8,<sp>9,<sp>10,<sp>ROOT]" , "[11,<sp>2,<sp>10,<sp>8,<sp>9,<sp>ROOT]" , "[8,<sp>11,<sp>9,<sp>2,<sp>10,<sp>ROOT]" , "[11,<sp>8,<sp>9,<sp>10,<sp>2,<sp>ROOT]" , "[11,<sp>10,<sp>8,<sp>9,<sp>2,<sp>ROOT]" } ) ; for ( int i : edu . jhu . pacaya . util . collections . QLists . getList ( 0 , 1 , 2 ) ) { edu . jhu . pacaya . autodiff . Toposort . Deps < java . lang . String > deps = new edu . jhu . pacaya . autodiff . ToposortTest . ShuffledSimpleGraph ( ( i * 3 ) ) ; java . util . List < java . lang . String > sort = edu . jhu . pacaya . autodiff . Toposort . toposort ( edu . jhu . pacaya . util . collections . QLists . getList ( "7" , "5" , "3" ) , "ROOT" , deps , true ) ; if ( valid . contains ( sort . toString ( ) ) ) { System . out . println ( ( "i:" + i ) ) ; } System . out . println ( sort ) ; "<AssertPlaceHolder>" ; } } contains ( edu . jhu . pacaya . gm . model . Var ) { return config . containsKey ( var ) ; }
|
org . junit . Assert . assertTrue ( valid . contains ( sort . toString ( ) ) )
|
testOnTheFlyCS ( ) { java . lang . String mainClass = TestInfo . TEST_ONTHEFLY_CS ; final com . ibm . wala . demandpa . alg . IDemandPointerAnalysis dmp = makeDemandPointerAnalysis ( mainClass ) ; com . ibm . wala . ipa . callgraph . CGNode testMethod = com . ibm . wala . core . tests . demandpa . AbstractPtrTest . findInstanceMethod ( dmp . getBaseCallGraph ( ) , dmp . getClassHierarchy ( ) . lookupClass ( com . ibm . wala . types . TypeReference . findOrCreate ( ClassLoaderReference . Application , "Ldemandpa/TestOnTheFlyCS$C2" ) ) , com . ibm . wala . util . strings . Atom . findOrCreateUnicodeAtom ( "doSomething" ) , com . ibm . wala . types . Descriptor . findOrCreateUTF8 ( "(Ljava/lang/Object;)V" ) ) ; com . ibm . wala . ipa . callgraph . propagation . PointerKey keyToQuery = com . ibm . wala . core . tests . demandpa . AbstractPtrTest . getParam ( testMethod , "testThisVar" , dmp . getHeapModel ( ) ) ; java . util . Collection < com . ibm . wala . ipa . callgraph . propagation . InstanceKey > pointsTo = dmp . getPointsTo ( keyToQuery ) ; if ( debug ) { System . err . println ( ( ( ( "points-to<sp>for<sp>" + mainClass ) + ":<sp>" ) + pointsTo ) ) ; } "<AssertPlaceHolder>" ; } size ( ) { return ( V ) == null ? 0 : V . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , pointsTo . size ( ) )
|
toSortedListBy ( ) { org . eclipse . collections . api . set . sorted . ImmutableSortedSet < java . lang . Integer > integers = this . classUnderTest ( ) ; org . eclipse . collections . api . list . MutableList < java . lang . Integer > list = integers . toSortedListBy ( String :: valueOf ) ; "<AssertPlaceHolder>" ; } toList ( ) { return null ; }
|
org . junit . Assert . assertEquals ( integers . toList ( ) , list )
|
testGetUsers ( ) { java . util . List < com . box . l10n . mojito . rest . entity . User > users = userClient . getUsers ( null ) ; "<AssertPlaceHolder>" ; for ( com . box . l10n . mojito . rest . entity . User user : users ) { com . box . l10n . mojito . rest . security . UserWSTest . logger . debug ( "{}:<sp>{}" , user . getUsername ( ) , authoritiesToString ( user . getAuthorities ( ) ) ) ; } } getUsers ( java . lang . String ) { java . util . Map < java . lang . String , java . lang . String > filterParams = new java . util . HashMap ( ) ; if ( username != null ) { filterParams . put ( "username" , username ) ; } return authenticatedRestTemplate . getForObjectAsListWithQueryStringParams ( getBasePathForEntity ( ) , com . box . l10n . mojito . rest . entity . User [ ] . class , filterParams ) ; }
|
org . junit . Assert . assertFalse ( users . isEmpty ( ) )
|
testCheckTGTAndRelogin ( ) { final org . apache . nifi . security . krb . KerberosUser user1 = new org . apache . nifi . security . krb . KerberosKeytabUser ( org . apache . nifi . security . krb . KerberosUserIT . principal1 . getName ( ) , org . apache . nifi . security . krb . KerberosUserIT . principal1KeytabFile . getAbsolutePath ( ) ) ; user1 . login ( ) ; boolean performedRelogin = false ; for ( int i = 0 ; i < 30 ; i ++ ) { java . lang . Thread . sleep ( 1000 ) ; System . out . println ( ( "checkTGTAndRelogin<sp>#" + i ) ) ; performedRelogin = user1 . checkTGTAndRelogin ( ) ; if ( performedRelogin ) { System . out . println ( "Performed<sp>relogin!" ) ; break ; } } "<AssertPlaceHolder>" ; } println ( java . lang . String ) { output . println ( val ) ; }
|
org . junit . Assert . assertEquals ( true , performedRelogin )
|
testJoinEmptyString ( ) { java . lang . String joined = com . hazelcast . simulator . utils . FormatUtils . join ( Collections . EMPTY_LIST ) ; "<AssertPlaceHolder>" ; } join ( java . lang . Iterable ) { return com . hazelcast . simulator . utils . FormatUtils . join ( collection , com . hazelcast . simulator . utils . FormatUtils . DEFAULT_DELIMITER ) ; }
|
org . junit . Assert . assertEquals ( "" , joined )
|
shiftbug003 ( ) { com . googlecode . javaewah . EWAHCompressedBitmap bm1 = com . googlecode . javaewah . EWAHCompressedBitmap . bitmapOf ( 10 , 11 , 12 , 13 , 62 ) ; com . googlecode . javaewah . EWAHCompressedBitmap bm2 = bm1 . shift ( 1 ) ; com . googlecode . javaewah . EWAHCompressedBitmap bm3 = bm1 . or ( bm2 ) ; com . googlecode . javaewah . EWAHCompressedBitmap bm4 = com . googlecode . javaewah . EWAHCompressedBitmap . bitmapOf ( 10 , 11 , 12 , 13 , 14 , 62 , 63 ) ; "<AssertPlaceHolder>" ; } or ( com . googlecode . javaewah . EWAHCompressedBitmap [ ] ) { if ( ( bitmaps . length ) == 1 ) return bitmaps [ 0 ] ; int largestSize = com . googlecode . javaewah . EWAHCompressedBitmap . calculateInitialSize ( bitmaps ) ; final com . googlecode . javaewah . EWAHCompressedBitmap container = new com . googlecode . javaewah . EWAHCompressedBitmap ( ( ( int ) ( largestSize * 1.5 ) ) ) ; com . googlecode . javaewah . EWAHCompressedBitmap . orWithContainer ( container , bitmaps ) ; return container ; }
|
org . junit . Assert . assertEquals ( bm3 , bm4 )
|
moduleFilter ( ) { final com . b2international . index . query . Expression actual = eval ( ( ( "*<sp>{{<sp>moduleId=<sp>" + ( com . b2international . snowowl . snomed . common . SnomedConstants . Concepts . MODULE_SCT_CORE ) ) + "<sp>}}" ) ) ; final com . b2international . index . query . Expression expected = SnomedDocument . Expressions . modules ( com . google . common . collect . ImmutableList . of ( Concepts . MODULE_SCT_CORE ) ) ; "<AssertPlaceHolder>" ; } of ( com . b2international . commons . exceptions . ApiError ) { return new com . b2international . snowowl . snomed . api . rest . domain . RestApiError . Builder ( error ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
source_not_uri_01 ( ) { org . apache . jena . graph . Graph graph = org . apache . jena . sparql . graph . GraphFactory . createGraphMem ( ) ; org . apache . jena . riot . RDFParserBuilder . create ( ) . lang ( Lang . TTL ) . fromString ( org . apache . jena . riot . TestRDFParser . testdata ) . parse ( graph ) ; "<AssertPlaceHolder>" ; } size ( ) { return pmap . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , graph . size ( ) )
|
getsProjectionStateWhileRunning ( ) { final java . lang . String stream = generateStreamName ( ) ; eventstore . appendToStream ( stream , ExpectedVersion . ANY , newTestEvent ( ) ) . join ( ) ; eventstore . appendToStream ( stream , ExpectedVersion . ANY , newTestEvent ( ) ) . join ( ) ; java . lang . String projection = "projection-" + stream ; java . lang . String query = com . github . msemys . esjc . projection . ITProjectionManager . createStandardQuery ( stream ) ; projectionManager . create ( projection , query , com . github . msemys . esjc . projection . CONTINUOUS ) . join ( ) ; java . lang . String state = projectionManager . getState ( projection ) . join ( ) ; "<AssertPlaceHolder>" ; } isNullOrEmpty ( java . lang . String ) { return ( string == null ) || ( string . isEmpty ( ) ) ; }
|
org . junit . Assert . assertFalse ( isNullOrEmpty ( state ) )
|
testNext1 ( ) { org . teiid . jdbc . BatchResults batchResults = getBatchResults ( createEmptyBatch ( ) , true ) ; "<AssertPlaceHolder>" ; } next ( ) { checkClosed ( ) ; if ( hasNext ( ) ) { return batchResults . next ( ) ; } batchResults . next ( ) ; return false ; }
|
org . junit . Assert . assertFalse ( batchResults . next ( ) )
|
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . portal . kernel . model . LayoutPrototype missingLayoutPrototype = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
|
org . junit . Assert . assertNull ( missingLayoutPrototype )
|
testCreateWithExceptionsNullEvalNotFound ( ) { try { org . sagebionetworks . repo . model . AccessControlList acl = new org . sagebionetworks . repo . model . AccessControlList ( ) ; acl . setId ( "123" ) ; acl = evaluationPermissionsManager . createAcl ( adminUserInfo , acl ) ; aclsToDelete . add ( acl . getId ( ) ) ; org . junit . Assert . fail ( ) ; } catch ( org . sagebionetworks . repo . web . NotFoundException e ) { "<AssertPlaceHolder>" ; } } getId ( ) { return id ; }
|
org . junit . Assert . assertTrue ( true )
|
testCacheTokenWithNullTokenField ( ) { org . scribe . model . Token testToken = new org . scribe . model . Token ( null , "secret" ) ; oAuthTokenCacheService . cacheToken ( testToken ) ; "<AssertPlaceHolder>" ; } cacheToken ( org . scribe . model . Token ) { if ( ( requestToken == null ) || ( ( requestToken . getToken ( ) ) == null ) ) { return ; } tokenCache . put ( requestToken . getToken ( ) , requestToken ) ; }
|
org . junit . Assert . assertEquals ( 1 , oAuthTokenCacheService . tokenCache . size ( ) )
|
getDescription ( ) { org . phenotips . translation . TranslationManager tm = this . mocker . getInstance ( org . phenotips . translation . TranslationManager . class ) ; when ( tm . translate ( "phenotips.permissions.visibility.private.description" ) ) . thenReturn ( "Private<sp>cases<sp>are<sp>only<sp>accessible<sp>to<sp>their<sp>owners." ) ; "<AssertPlaceHolder>" ; } getDescription ( ) { org . phenotips . translation . TranslationManager tm = this . mocker . getInstance ( org . phenotips . translation . TranslationManager . class ) ; when ( tm . translate ( "phenotips.permissions.accessLevels.view.description" ) ) . thenReturn ( "Can<sp>view<sp>the<sp>patient<sp>data" ) ; org . junit . Assert . assertEquals ( "Can<sp>view<sp>the<sp>patient<sp>data" , this . mocker . getComponentUnderTest ( ) . getDescription ( ) ) ; }
|
org . junit . Assert . assertEquals ( "Private<sp>cases<sp>are<sp>only<sp>accessible<sp>to<sp>their<sp>owners." , this . mocker . getComponentUnderTest ( ) . getDescription ( ) )
|
testEngineShutsDownWhenItReceivesUnexpectedExceptionFromTradingStrategy ( ) { setupConfigLoadingExpectations ( ) ; final java . lang . String exceptionErrorMsg = "Ah,<sp>curse<sp>your<sp>sudden<sp>but<sp>inevitable<sp>betrayal!" ; final com . gazbert . bxbot . core . engine . Map < java . lang . String , java . math . BigDecimal > balancesAvailable = new com . gazbert . bxbot . core . engine . HashMap ( ) ; balancesAvailable . put ( com . gazbert . bxbot . core . engine . TestTradingEngine . ENGINE_EMERGENCY_STOP_CURRENCY , new java . math . BigDecimal ( "0.5" ) ) ; final com . gazbert . bxbot . trading . api . BalanceInfo balanceInfo = org . powermock . api . easymock . PowerMock . createMock ( com . gazbert . bxbot . trading . api . BalanceInfo . class ) ; expect ( exchangeAdapter . getBalanceInfo ( ) ) . andReturn ( balanceInfo ) ; expect ( balanceInfo . getBalancesAvailable ( ) ) . andReturn ( balancesAvailable ) ; tradingStrategy . execute ( ) ; expect ( exchangeAdapter . getBalanceInfo ( ) ) . andReturn ( balanceInfo ) ; expect ( balanceInfo . getBalancesAvailable ( ) ) . andReturn ( balancesAvailable ) ; tradingStrategy . execute ( ) ; expectLastCall ( ) . andThrow ( new java . lang . IllegalArgumentException ( exceptionErrorMsg ) ) ; emailAlerter . sendMessage ( eq ( com . gazbert . bxbot . core . engine . TestTradingEngine . CRITICAL_EMAIL_ALERT_SUBJECT ) , contains ( ( ( "An<sp>unexpected<sp>FATAL<sp>error<sp>has<sp>occurred<sp>in" + "<sp>Exchange<sp>Adapter<sp>or<sp>Trading<sp>Strategy!<sp>Details:<sp>" ) + exceptionErrorMsg ) ) ) ; org . powermock . api . easymock . PowerMock . replayAll ( ) ; final com . gazbert . bxbot . core . engine . TradingEngine tradingEngine = new com . gazbert . bxbot . core . engine . TradingEngine ( exchangeConfigService , engineConfigService , strategyConfigService , marketConfigService , emailAlerter ) ; tradingEngine . start ( ) ; com . gazbert . bxbot . core . engine . TestTradingEngine . waitForEngineStateChange ( tradingEngine , com . gazbert . bxbot . core . engine . TestTradingEngine . EngineState . SHUTDOWN , com . gazbert . bxbot . core . engine . TestTradingEngine . NUMBER_OF_TRADE_CYCLES ) ; "<AssertPlaceHolder>" ; org . powermock . api . easymock . PowerMock . verifyAll ( ) ; } isRunning ( ) { com . gazbert . bxbot . core . engine . TradingEngine . LOG . info ( ( ) -> "isRunning:<sp>" + ( isRunning ) ) ; return isRunning ; }
|
org . junit . Assert . assertFalse ( tradingEngine . isRunning ( ) )
|
refinementReversedAttributeEquals ( ) { generateDrugHierarchy ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:<sp>R<sp>%s=%s" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . SUBSTANCE , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . HAS_ACTIVE_INGREDIENT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . TRIPHASIL_TABLET ) ) ; final com . b2international . index . query . Expression expected = com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . and ( descendantsOf ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . SUBSTANCE ) , ids ( com . google . common . collect . ImmutableSet . of ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . INGREDIENT1 , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . INGREDIENT2 ) ) ) ; "<AssertPlaceHolder>" ; } of ( java . lang . String , java . lang . String ) { return new com . b2international . snowowl . snomed . core . ecl . EclExpression ( ecl , expressionForm ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
creatingServers_true_when_noCluster_and_START_IF_NEEDED_startPolicy ( ) { oracle . kubernetes . operator . helpers . DomainPresenceInfo domainPresenceInfo = createDomainPresenceInfo ( ) ; configureDomain ( domainPresenceInfo ) . withDefaultServerStartPolicy ( ConfigurationConstants . START_IF_NEEDED ) ; "<AssertPlaceHolder>" ; } creatingServers ( oracle . kubernetes . operator . helpers . DomainPresenceInfo ) { oracle . kubernetes . weblogic . domain . model . Domain dom = info . getDomain ( ) ; oracle . kubernetes . weblogic . domain . model . DomainSpec spec = dom . getSpec ( ) ; java . util . List < oracle . kubernetes . weblogic . domain . model . Cluster > clusters = spec . getClusters ( ) ; java . util . List < oracle . kubernetes . weblogic . domain . model . ManagedServer > servers = spec . getManagedServers ( ) ; for ( oracle . kubernetes . weblogic . domain . model . Cluster cluster : clusters ) { int replicaCount = dom . getReplicaCount ( cluster . getClusterName ( ) ) ; java . lang . String clusterServerStartPolicy = cluster . getServerStartPolicy ( ) ; oracle . kubernetes . operator . helpers . JobHelper . LOGGER . fine ( ( ( ( ( ( "Start<sp>Policy:<sp>" + clusterServerStartPolicy ) + ",<sp>replicaCount:<sp>" ) + replicaCount ) + "<sp>for<sp>cluster:<sp>" ) + cluster ) ) ; if ( ( ( clusterServerStartPolicy == null ) || ( ! ( clusterServerStartPolicy . equals ( ConfigurationConstants . START_NEVER ) ) ) ) && ( replicaCount > 0 ) ) { return true ; } } java . lang . String domainServerStartPolicy = dom . getSpec ( ) . getServerStartPolicy ( ) ; if ( ( domainServerStartPolicy == null ) || ( ! ( domainServerStartPolicy . equals ( ConfigurationConstants . START_NEVER ) ) ) ) { return true ; } for ( oracle . kubernetes . weblogic . domain . model . ManagedServer server : servers ) { java . lang . String serverStartPolicy = server . getServerStartPolicy ( ) ; if ( ( serverStartPolicy == null ) || ( ! ( serverStartPolicy . equals ( ConfigurationConstants . START_NEVER ) ) ) ) { return true ; } } return false ; }
|
org . junit . Assert . assertThat ( oracle . kubernetes . operator . helpers . JobHelper . creatingServers ( domainPresenceInfo ) , org . hamcrest . CoreMatchers . equalTo ( true ) )
|
testLockAndLoadSingleEntityRevertsUnflushedMerge ( ) { org . candlepin . model . Owner owner = this . createOwner ( "owner_key-1" , "owner-1" ) ; owner . setDisplayName ( "changed_name" ) ; testOwnerCurator . merge ( owner ) ; this . testOwnerCurator . lockAndLoad ( owner ) ; "<AssertPlaceHolder>" ; } getDisplayName ( ) { return this . displayName ; }
|
org . junit . Assert . assertEquals ( "owner-1" , owner . getDisplayName ( ) )
|
testRequestScopeActive ( ) { org . jboss . as . test . integration . ejb . async . AsyncBean bean = lookup ( org . jboss . as . test . integration . ejb . async . AsyncBean . class ) ; final java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 1 ) ; final java . util . concurrent . Future < java . lang . Integer > future = bean . testRequestScopeActive ( latch ) ; latch . countDown ( ) ; int result = future . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return new java . util . AbstractMap . SimpleImmutableEntry < > ( this . group . get ( ) . getLocalMember ( ) . getName ( ) , this . getClientMappings ( ) ) ; }
|
org . junit . Assert . assertEquals ( 20 , result )
|
testSetRightSibling ( ) { com . orientechnologies . common . directmemory . OByteBufferPool bufferPool = com . orientechnologies . common . directmemory . OByteBufferPool . instance ( null ) ; com . orientechnologies . common . directmemory . OPointer pointer = bufferPool . acquireDirect ( true ) ; com . orientechnologies . orient . core . storage . cache . OCachePointer cachePointer = new com . orientechnologies . orient . core . storage . cache . OCachePointer ( pointer , bufferPool , 0 , 0 ) ; cachePointer . incrementReferrer ( ) ; com . orientechnologies . orient . core . storage . cache . OCacheEntry cacheEntry = new com . orientechnologies . orient . core . storage . cache . OCacheEntryImpl ( 0 , 0 , cachePointer ) ; cacheEntry . acquireExclusiveLock ( ) ; com . orientechnologies . orient . core . storage . index . sbtree . local . OSBTreeBucket < java . lang . Long , com . orientechnologies . orient . core . db . record . OIdentifiable > treeBucket = new com . orientechnologies . orient . core . storage . index . sbtree . local . OSBTreeBucket ( cacheEntry , true , com . orientechnologies . common . serialization . types . OLongSerializer . INSTANCE , null , com . orientechnologies . orient . core . serialization . serializer . binary . impl . OLinkSerializer . INSTANCE , null ) ; treeBucket . setRightSibling ( 123 ) ; "<AssertPlaceHolder>" ; cacheEntry . releaseExclusiveLock ( ) ; cachePointer . decrementReferrer ( ) ; } getRightSibling ( ) { return com . orientechnologies . orient . core . storage . index . sbtreebonsai . local . OSBTreeBonsaiBucket . getBucketPointer ( ( ( offset ) + ( com . orientechnologies . orient . core . storage . index . sbtreebonsai . local . OSBTreeBonsaiBucket . RIGHT_SIBLING_OFFSET ) ) ) ; }
|
org . junit . Assert . assertEquals ( treeBucket . getRightSibling ( ) , 123 )
|
testEndingWithUnderscoreMoreThanOneGroup ( ) { nameForCrossEntityAggregate = "for_aggregate_" ; "<AssertPlaceHolder>" ; } isValid ( java . lang . String , javax . validation . ConstraintValidatorContext ) { if ( ( null == nameForCrossEntityAggregate ) || ( nameForCrossEntityAggregate . isEmpty ( ) ) ) { return true ; } return com . cloudera . csd . validation . monitoring . MonitoringConventions . isValidMetricNameFormat ( nameForCrossEntityAggregate ) ; }
|
org . junit . Assert . assertFalse ( validator . isValid ( nameForCrossEntityAggregate , context ) )
|
testSynchronisatieResultaatMeldingenWordenDoorgegeven ( ) { final java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = new java . util . ArrayList ( ) ; final nl . bzk . brp . levering . synchronisatie . dto . synchronisatie . SynchronisatieResultaat synchronisatieResultaat = new nl . bzk . brp . levering . synchronisatie . dto . synchronisatie . SynchronisatieResultaat ( meldingen ) ; "<AssertPlaceHolder>" ; } getMeldingen ( ) { return meldingen ; }
|
org . junit . Assert . assertEquals ( meldingen , synchronisatieResultaat . getMeldingen ( ) )
|
testSDCardFileNameBadSuffix ( ) { try { org . arquillian . droidium . container . configuration . Validate . sdCardFileName ( "card.abc" , "SD<sp>card<sp>name<sp>is<sp>not<sp>valid!" ) ; org . junit . Assert . fail ( ) ; } catch ( org . arquillian . droidium . container . configuration . AndroidContainerConfigurationException ex ) { java . lang . String expected = "SD<sp>card<sp>name<sp>is<sp>not<sp>valid!" ; "<AssertPlaceHolder>" ; } } sdCardFileName ( java . lang . String , java . lang . String ) { org . arquillian . droidium . container . configuration . Validate . notNullOrEmpty ( fileName , "SD<sp>card<sp>file<sp>name<sp>to<sp>validate<sp>is<sp>null<sp>or<sp>empty<sp>string" ) ; org . arquillian . droidium . container . configuration . Validate . notNullOrEmpty ( message , "exception<sp>message<sp>can't<sp>be<sp>null<sp>or<sp>empty<sp>string" ) ; if ( fileName . endsWith ( java . lang . System . getProperty ( "file.separator" ) ) ) { throw new org . arquillian . droidium . container . configuration . AndroidContainerConfigurationException ( ( "File<sp>name<sp>of<sp>SD<sp>card<sp>can't<sp>end<sp>with<sp>" + "system<sp>file<sp>separator.<sp>It<sp>denotes<sp>a<sp>directory<sp>and<sp>not<sp>a<sp>file!" ) ) ; } java . lang . String [ ] tokens = new java . io . File ( fileName ) . getName ( ) . split ( "\\." ) ; if ( ( ( ! ( ( tokens . length ) >= 2 ) ) || ( ! ( tokens [ ( ( tokens . length ) - 1 ) ] . equals ( "img" ) ) ) ) || ( tokens [ 0 ] . trim ( ) . isEmpty ( ) ) ) { throw new org . arquillian . droidium . container . configuration . AndroidContainerConfigurationException ( message ) ; } }
|
org . junit . Assert . assertEquals ( expected , ex . getMessage ( ) )
|
testTimeSeriesEval ( ) { int [ ] shape = new int [ ] { 2 , 4 , 3 } ; org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; org . nd4j . linalg . api . ndarray . INDArray labels = org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . api . ops . random . impl . BernoulliDistribution ( org . nd4j . linalg . factory . Nd4j . createUninitialized ( shape ) , 0.5 ) ) ; org . nd4j . linalg . api . ndarray . INDArray predicted = org . nd4j . linalg . factory . Nd4j . rand ( shape ) ; org . nd4j . linalg . api . ndarray . INDArray mask = org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . api . ops . random . impl . BernoulliDistribution ( org . nd4j . linalg . factory . Nd4j . createUninitialized ( shape ) , 0.5 ) ) ; org . nd4j . evaluation . classification . EvaluationBinary eb1 = new org . nd4j . evaluation . classification . EvaluationBinary ( ) ; eb1 . eval ( labels , predicted , mask ) ; org . nd4j . evaluation . classification . EvaluationBinary eb2 = new org . nd4j . evaluation . classification . EvaluationBinary ( ) ; for ( int i = 0 ; i < ( shape [ 2 ] ) ; i ++ ) { org . nd4j . linalg . api . ndarray . INDArray l = labels . get ( org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org . nd4j . linalg . indexing . NDArrayIndex . point ( i ) ) ; org . nd4j . linalg . api . ndarray . INDArray p = predicted . get ( org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org . nd4j . linalg . indexing . NDArrayIndex . point ( i ) ) ; org . nd4j . linalg . api . ndarray . INDArray m = mask . get ( org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org . nd4j . linalg . indexing . NDArrayIndex . point ( i ) ) ; eb2 . eval ( l , p , m ) ; } "<AssertPlaceHolder>" ; } stats ( ) { if ( ! ( initialized ) ) { return "RegressionEvaluation:<sp>No<sp>Data" ; } else { if ( ( columnNames ) == null ) columnNames = org . nd4j . evaluation . regression . RegressionEvaluation . createDefaultColumnNames ( numColumns ( ) ) ; int maxLabelLength = 0 ; for ( java . lang . String s : columnNames ) maxLabelLength = java . lang . Math . max ( maxLabelLength , s . length ( ) ) ; int labelWidth = maxLabelLength + 5 ; long columnWidth = ( precision ) + 10 ; java . lang . String resultFormat = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "%-" + labelWidth ) + "." 1 ) + "%-" ) + columnWidth ) + "." ) + ( precision ) ) + "e" ) + "%-" ) + columnWidth ) + "." ) + ( precision ) ) + "e" ) + "%-" ) + columnWidth ) + "." ) + ( precision ) ) + "e" ) + "%-" ) + columnWidth ) + "." ) + ( precision ) ) + "e" ) + "%-" ) + columnWidth ) + "." ) + ( precision ) ) + "e" ) + "%-" ) + columnWidth ) + "." ) + ( precision ) ) + "e" ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; java . lang . String headerFormat = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "%-" + labelWidth ) + "." 1 ) + "%-" ) + columnWidth ) + "." 1 ) + "%-" ) + columnWidth ) + "." 1 ) + "%-" ) + columnWidth ) + "." 1 ) + "%-" ) + columnWidth ) + "." 1 ) + "%-" ) + columnWidth ) + "." 1 ) + "%-" ) + columnWidth ) + "." 1 ; sb . append ( java . lang . String . format ( headerFormat , "Column" , "MSE" , "MAE" , "RMSE" , "RSE" , "PC" , "." 2 ) ) ; sb . append ( "." 0 ) ; for ( int i = 0 ; i < ( columnNames . size ( ) ) ; i ++ ) { java . lang . String name = columnNames . get ( i ) ; double mse = meanSquaredError ( i ) ; double mae = meanAbsoluteError ( i ) ; double rmse = rootMeanSquaredError ( i ) ; double rse = relativeSquaredError ( i ) ; double corr = pearsonCorrelation ( i ) ; double r2 = rSquared ( i ) ; sb . append ( java . lang . String . format ( resultFormat , name , mse , mae , rmse , rse , corr , r2 ) ) ; sb . append ( "." 0 ) ; } return sb . toString ( ) ; } }
|
org . junit . Assert . assertEquals ( eb2 . stats ( ) , eb1 . stats ( ) )
|
testIsReentrantNonReentrant ( ) { final org . osgi . framework . ServiceReference handlerReference = context . mock ( org . osgi . framework . ServiceReference . class , "handlerReference" ) ; context . checking ( new org . jmock . Expectations ( ) { { allowing ( handlerReference ) . getProperty ( EventConstants . EVENT_TOPIC ) ; will ( returnValue ( null ) ) ; allowing ( handlerReference ) . getProperty ( EventConstants . EVENT_FILTER ) ; will ( returnValue ( null ) ) ; allowing ( handlerReference ) . getProperty ( org . osgi . framework . Constants . SERVICE_ID ) ; will ( returnValue ( 20L ) ) ; allowing ( handlerReference ) . getProperty ( org . osgi . framework . Constants . SERVICE_RANKING ) ; will ( returnValue ( null ) ) ; allowing ( handlerReference ) . getProperty ( EventEngine . REENTRANT_HANDLER ) ; will ( returnValue ( "false" ) ) ; } } ) ; com . ibm . ws . event . internal . HandlerHolder holder = new com . ibm . ws . event . internal . HandlerHolder ( eventEngine , handlerReference , false ) ; "<AssertPlaceHolder>" ; } isReentrant ( ) { return reentrant ; }
|
org . junit . Assert . assertFalse ( holder . isReentrant ( ) )
|
test1True ( ) { ru . kfu . itis . issst . uima . morph . commons . TwoTagPredicate predMock = mock ( ru . kfu . itis . issst . uima . morph . commons . TwoTagPredicate . class ) ; when ( predMock . apply ( bs1 , bs2 ) ) . thenReturn ( true ) ; ru . kfu . itis . issst . uima . morph . commons . TwoTagPredicateConjunction conj = ru . kfu . itis . issst . uima . morph . commons . TwoTagPredicateConjunction . and ( predMock ) ; "<AssertPlaceHolder>" ; } apply ( java . util . BitSet , java . util . BitSet ) { for ( ru . kfu . itis . issst . uima . morph . commons . TwoTagPredicate inner : operands ) { if ( ! ( inner . apply ( first , second ) ) ) { return false ; } } return true ; }
|
org . junit . Assert . assertEquals ( true , conj . apply ( bs1 , bs2 ) )
|
testPostfixFunction16 ( ) { java . lang . String expr ; double expected ; expr = "<sp>exp(x)" ; net . objecthunter . exp4j . Expression e = new net . objecthunter . exp4j . ExpressionBuilder ( expr ) . variables ( "x" ) . build ( ) ; for ( double x = - 10 ; x < 10 ; x = x + 0.5 ) { expected = java . lang . Math . Math . exp ( x ) ; "<AssertPlaceHolder>" ; } } setVariable ( java . lang . String , double ) { this . checkVariableName ( name ) ; this . variables . put ( name , java . lang . Double . valueOf ( value ) ) ; return this ; }
|
org . junit . Assert . assertTrue ( ( expected == ( e . setVariable ( "x" , x ) . evaluate ( ) ) ) )
|
testNumPIDs ( ) { org . eclipse . debug . core . ILaunchConfiguration config = createConfiguration ( proj . getProject ( ) ) ; doLaunch ( config , "testNumPIDs" ) ; org . eclipse . linuxtools . internal . valgrind . cachegrind . CachegrindViewPart view = ( ( org . eclipse . linuxtools . internal . valgrind . cachegrind . CachegrindViewPart ) ( org . eclipse . linuxtools . internal . valgrind . ui . ValgrindUIPlugin . getDefault ( ) . getView ( ) . getDynamicView ( ) ) ) ; "<AssertPlaceHolder>" ; } getOutputs ( ) { return outputs ; }
|
org . junit . Assert . assertEquals ( 1 , view . getOutputs ( ) . length )
|
find_shouldFindMessageBody ( ) { java . lang . String in = "<body>edtest\n</body><subject/><time<sp>xmlns=\'http://silentcircle.com/timestamp\'<sp>stamp=\'2014-07-18T03:22:22.575Z\'/><delay<sp>xmlns=\'urn:xmpp:delay\'<sp>from=\'xmpp-dev.silentcircle.net\'<sp>stamp=\'2014-07-18T03:22:22Z\'>Offline<sp>Storage</delay><x<sp>xmlns=\'jabber:x:delay\'<sp>stamp=\'20140718T03:22:22\'/>" ; java . lang . String expected = "edtest\n" ; java . lang . String regex = "<body>([^<]+)</body>" ; java . lang . String actual = com . silentcircle . silenttext . util . StringUtils . find ( in , regex , 1 ) ; "<AssertPlaceHolder>" ; } find ( java . lang . String , java . lang . String , int ) { java . util . regex . Pattern pattern = java . util . regex . Pattern . compile ( regex , ( ( java . util . regex . Pattern . MULTILINE ) | ( java . util . regex . Pattern . DOTALL ) ) ) ; java . util . regex . Matcher matcher = pattern . matcher ( input ) ; if ( matcher . find ( ) ) { if ( ( matcher . groupCount ( ) ) < group ) { throw new java . lang . IllegalArgumentException ( ) ; } return matcher . group ( group ) ; } return null ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
formatatomacceptJSONxml ( ) { com . fujitsu . dc . core . rs . odata . ODataEntityResource odataEntityResource = new com . fujitsu . dc . core . rs . odata . ODataEntityResource ( ) ; javax . ws . rs . core . MediaType type = odataEntityResource . decideOutputFormat ( MediaType . APPLICATION_JSON , "atom" ) ; "<AssertPlaceHolder>" ; } decideOutputFormat ( java . lang . String , java . lang . String ) { javax . ws . rs . core . MediaType mediaType = null ; if ( format != null ) { mediaType = decideOutputFormatFromQueryValue ( format ) ; } else if ( accept != null ) { mediaType = decideOutputFormatFromHeaderValues ( accept ) ; } if ( mediaType == null ) { mediaType = javax . ws . rs . core . MediaType . APPLICATION_ATOM_XML_TYPE ; } return mediaType ; }
|
org . junit . Assert . assertEquals ( MediaType . APPLICATION_ATOM_XML_TYPE , type )
|
testlistByLibraryExists ( ) { "<AssertPlaceHolder>" ; } listByLibrary ( long ) { @ uk . ac . bbsrc . tgac . miso . persistence . impl . SuppressWarnings ( "unchecked" ) java . util . List < uk . ac . bbsrc . tgac . miso . core . data . Workset > results = currentSession ( ) . createCriteria ( uk . ac . bbsrc . tgac . miso . core . data . Workset . class ) . createAlias ( "libraries" , "library" ) . add ( org . hibernate . criterion . Restrictions . eq ( "library.id" , libraryId ) ) . list ( ) ; return results ; }
|
org . junit . Assert . assertEquals ( 4 , dao . listByLibrary ( 10 ) . size ( ) )
|
deleteReturnsFalseOnException ( ) { org . mockito . Mockito . doThrow ( new com . xpn . xwiki . XWikiException ( ) ) . when ( this . xwiki ) . deleteDocument ( this . doc , this . xcontext ) ; "<AssertPlaceHolder>" ; } delete ( E extends org . phenotips . entities . PrimaryEntity ) { try { com . xpn . xwiki . XWikiContext xcontext = this . xcontextProvider . get ( ) ; com . xpn . xwiki . doc . XWikiDocument doc = entity . getXDocument ( ) ; xcontext . getWiki ( ) . deleteDocument ( doc , xcontext ) ; return true ; } catch ( java . lang . Exception ex ) { this . logger . warn ( "Failed<sp>to<sp>delete<sp>entity<sp>[{}]:<sp>{}" , entity . getDocumentReference ( ) , ex . getMessage ( ) ) ; } return false ; }
|
org . junit . Assert . assertFalse ( this . manager . delete ( new org . phenotips . entities . spi . Person ( this . doc ) ) )
|
notification_after_reconfigure ( ) { nmsService . readMessages ( ) ; org . terracotta . management . entity . sample . client . CacheEntityFactory factory0 = new org . terracotta . management . entity . sample . client . CacheEntityFactory ( webappNodes . get ( 0 ) . getConnection ( ) ) ; factory0 . reconfigure ( "pet-clinic/pets" , "pet-clinic/clients" ) ; java . lang . String [ ] latestReceivedNotifs = new java . lang . String [ ] { "SERVER_CACHE_DESTROYED" , "SERVER_CACHE_CREATED" , "CLIENT_ATTACHED" , "CLIENT_ATTACHED" , "SERVER_ENTITY_RECONFIGURED" } ; java . util . List < org . terracotta . management . model . notification . ContextualNotification > notifs = waitForAllNotifications ( latestReceivedNotifs ) ; notifs = notifs . subList ( ( ( notifs . size ( ) ) - ( latestReceivedNotifs . length ) ) , notifs . size ( ) ) ; java . lang . String currentJson = toJson ( notifs ) . toString ( ) ; java . lang . String actual = removeRandomValues ( currentJson ) ; java . lang . String expected = readJson ( "notifications-after-reconfigure.json" ) . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { final java . lang . StringBuilder sb = new java . lang . StringBuilder ( "CombiningCapabilityManagementSupport{" ) ; sb . append ( "capabilityManagementSupports=" ) . append ( java . util . Arrays . toString ( capabilityManagementSupports ) ) ; sb . append ( '}' ) ; return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
should_create_artifact_success ( ) { com . flow . platform . api . domain . Artifact artifact = new com . flow . platform . api . domain . Artifact ( job . getId ( ) , "hello.apk" , "http://fir.im/aabcc" ) ; java . lang . String result = performRequestWith200Status ( post ( "/artifacts" ) . contentType ( java . lang . String . valueOf ( ContentType . APPLICATION_JSON ) ) . content ( Jsonable . GSON_CONFIG . toJson ( artifact ) ) ) ; artifact = com . flow . platform . domain . Jsonable . parse ( result , com . flow . platform . api . domain . Artifact . class ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String , java . lang . Class ) { return com . flow . platform . domain . Jsonable . GSON_CONFIG . fromJson ( json , tClass ) ; }
|
org . junit . Assert . assertNotNull ( artifact )
|
checkPoolRepairedWhenJedisIsBroken ( ) { redis . clients . jedis . JedisPool pool = new redis . clients . jedis . JedisPool ( new redis . clients . jedis . JedisPoolConfig ( ) , redis . clients . jedis . tests . JedisPoolTest . hnp . getHost ( ) , redis . clients . jedis . tests . JedisPoolTest . hnp . getPort ( ) ) ; redis . clients . jedis . Jedis jedis = pool . getResource ( ) ; jedis . auth ( "foobared" ) ; jedis . quit ( ) ; jedis . close ( ) ; jedis = pool . getResource ( ) ; jedis . auth ( "foobared" ) ; jedis . incr ( "foo" ) ; jedis . close ( ) ; pool . destroy ( ) ; "<AssertPlaceHolder>" ; } isClosed ( ) { return this . internalPool . isClosed ( ) ; }
|
org . junit . Assert . assertTrue ( pool . isClosed ( ) )
|
testGetInFlightMessageIds ( ) { org . eclipse . kura . data . DataService mockDataService = mock ( org . eclipse . kura . data . DataService . class ) ; org . eclipse . kura . core . cloud . CloudServiceImpl mockCloudService = mock ( org . eclipse . kura . core . cloud . CloudServiceImpl . class ) ; org . eclipse . kura . core . cloud . CloudClientImpl cloudClient = new org . eclipse . kura . core . cloud . CloudClientImpl ( "appId" , mockDataService , mockCloudService ) ; org . eclipse . kura . core . cloud . CloudServiceOptions options = new org . eclipse . kura . core . cloud . CloudServiceOptions ( null , null ) ; doReturn ( options ) . when ( mockCloudService ) . getCloudServiceOptions ( ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "^(" ) . append ( "\\$EDC" ) . append ( options . getTopicSeparator ( ) ) . append ( ")?" ) ; sb . append ( options . getTopicAccountToken ( ) ) . append ( options . getTopicSeparator ( ) ) . append ( ".+" ) ; sb . append ( options . getTopicSeparator ( ) ) . append ( "appId" ) . append ( "(/.+)?" ) ; java . lang . String topicRegex = sb . toString ( ) ; java . util . ArrayList < java . lang . Integer > expectedMessageIds = new java . util . ArrayList ( ) ; expectedMessageIds . add ( 1 ) ; expectedMessageIds . add ( 2 ) ; expectedMessageIds . add ( 3 ) ; doReturn ( expectedMessageIds ) . when ( mockDataService ) . getInFlightMessageIds ( topicRegex ) ; java . util . List < java . lang . Integer > messageIds = cloudClient . getInFlightMessageIds ( ) ; "<AssertPlaceHolder>" ; } toArray ( ) { return data . toArray ( ) ; }
|
org . junit . Assert . assertArrayEquals ( expectedMessageIds . toArray ( ) , messageIds . toArray ( ) )
|
testCompletedScoreCardCompilation ( ) { java . lang . String xml1 = org . drools . workbench . models . guided . scorecard . backend . base . Helper . createGuidedScoreCardXML ( false ) ; org . kie . api . KieServices ks = KieServices . Factory . get ( ) ; org . kie . api . builder . KieFileSystem kfs = ks . newKieFileSystem ( ) ; kfs . write ( "pom.xml" , org . drools . workbench . models . guided . scorecard . backend . base . Helper . getPom ( ) ) ; kfs . write ( "src/main/resources/META-INF/kmodule.xml" , org . drools . workbench . models . guided . scorecard . backend . base . Helper . getKModule ( ) ) ; kfs . write ( "src/main/resources/sc1.scgd" , xml1 ) ; org . kie . api . builder . KieBuilder kieBuilder = ks . newKieBuilder ( kfs ) . buildAll ( ) ; final java . util . List < org . kie . api . builder . Message > messages = kieBuilder . getResults ( ) . getMessages ( ) ; org . drools . workbench . models . guided . scorecard . backend . base . Helper . dumpMessages ( messages ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , messages . size ( ) )
|
testNoGroupableIDs ( ) { org . orcid . core . utils . v3 . activities . WorkGroupAndGroupingSuggestionGenerator generator = new org . orcid . core . utils . v3 . activities . WorkGroupAndGroupingSuggestionGenerator ( ) ; for ( org . orcid . jaxb . model . v3 . rc2 . record . summary . WorkSummary summary : getWorkSummariesNoGroupableIds ( ) ) { generator . group ( summary ) ; } java . util . List < org . orcid . pojo . grouping . WorkGroupingSuggestion > suggestions = generator . getGroupingSuggestions ( "orcid" ) ; "<AssertPlaceHolder>" ; } getGroupingSuggestions ( java . lang . String ) { if ( ! ( Features . GROUPING_SUGGESTIONS . isActive ( ) ) ) { return null ; } boolean more = ( groupingSuggestionsCacheManager . getGroupingSuggestionCount ( orcid ) ) > ( SUGGESTION_BATCH_SIZE ) ; java . util . List < org . orcid . pojo . grouping . WorkGroupingSuggestion > suggestions = groupingSuggestionsCacheManager . getGroupingSuggestions ( orcid , org . orcid . core . manager . v3 . read_only . impl . SUGGESTION_BATCH_SIZE ) ; return getWorkGroupingSuggestions ( suggestions , more ) ; }
|
org . junit . Assert . assertEquals ( 0 , suggestions . size ( ) )
|
xmlToStringTest ( ) { org . w3c . dom . Document dom = new org . apache . xerces . dom . DocumentImpl ( ) ; java . lang . String actual = org . sagebionetworks . doi . datacite . DataciteMetadataTranslatorImpl . xmlToString ( dom ) ; "<AssertPlaceHolder>" ; } xmlToString ( org . w3c . dom . Document ) { com . sun . org . apache . xml . internal . serialize . OutputFormat format = new com . sun . org . apache . xml . internal . serialize . OutputFormat ( dom ) ; java . io . StringWriter xml = new java . io . StringWriter ( ) ; com . sun . org . apache . xml . internal . serialize . XMLSerializer serializer = new com . sun . org . apache . xml . internal . serialize . XMLSerializer ( xml , format ) ; try { serializer . serialize ( dom ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( "Error<sp>occurred<sp>while<sp>serializing<sp>metadata" , e ) ; } return xml . toString ( ) ; }
|
org . junit . Assert . assertNotNull ( actual )
|
padEndLengthSmaller ( ) { final java . lang . String s = "Eric<sp>the<sp>fruit<sp>bat" ; final java . lang . String padded = org . scijava . util . StringUtils . padEnd ( s , 3 , '*' ) ; "<AssertPlaceHolder>" ; } padEnd ( java . lang . String , int , char ) { if ( s == null ) { return null ; } final java . lang . StringBuilder builder = new java . lang . StringBuilder ( s ) ; final int padding = length - ( s . length ( ) ) ; for ( int i = 0 ; i < padding ; i ++ ) { builder . append ( padChar ) ; } return builder . toString ( ) ; }
|
org . junit . Assert . assertEquals ( s , padded )
|
testMultipleServiceBindingDifferentMajorVersion ( ) { final java . lang . String serviceName = "testServiceName" ; commandProcessor . bind ( new com . betfair . cougar . core . api . ServiceBindingDescriptor ( ) { @ com . betfair . cougar . transport . impl . protocol . http . Override public com . betfair . cougar . core . api . OperationBindingDescriptor [ ] getOperationBindings ( ) { return new com . betfair . cougar . core . api . OperationBindingDescriptor [ 0 ] ; } @ com . betfair . cougar . transport . impl . protocol . http . Override public com . betfair . cougar . core . api . ServiceVersion getServiceVersion ( ) { return new com . betfair . cougar . core . api . ServiceVersion ( "v1.2" ) ; } @ com . betfair . cougar . transport . impl . protocol . http . Override public java . lang . String getServiceName ( ) { return serviceName ; } @ com . betfair . cougar . transport . impl . protocol . http . Override public com . betfair . cougar . api . export . Protocol getServiceProtocol ( ) { return null ; } } ) ; commandProcessor . bind ( new com . betfair . cougar . core . api . ServiceBindingDescriptor ( ) { @ com . betfair . cougar . transport . impl . protocol . http . Override public com . betfair . cougar . core . api . OperationBindingDescriptor [ ] getOperationBindings ( ) { return new com . betfair . cougar . core . api . OperationBindingDescriptor [ 0 ] ; } @ com . betfair . cougar . transport . impl . protocol . http . Override public com . betfair . cougar . core . api . ServiceVersion getServiceVersion ( ) { return new com . betfair . cougar . core . api . ServiceVersion ( "v3.3" ) ; } @ com . betfair . cougar . transport . impl . protocol . http . Override public java . lang . String getServiceName ( ) { return serviceName ; } @ com . betfair . cougar . transport . impl . protocol . http . Override public com . betfair . cougar . api . export . Protocol getServiceProtocol ( ) { return null ; } } ) ; int count = 0 ; for ( com . betfair . cougar . core . api . ServiceBindingDescriptor ignored : commandProcessor . getServiceBindingDescriptors ( ) ) { count ++ ; } "<AssertPlaceHolder>" ; } getServiceBindingDescriptors ( ) { return serviceBindingDescriptors . values ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , count )
|
testFilterOK ( ) { java . lang . String ysld = "filter:<sp>scalerank<sp><<sp>4" ; java . util . List < org . yaml . snakeyaml . error . MarkedYAMLException > errors = validate ( ysld ) ; "<AssertPlaceHolder>" ; } size ( ) { return categories . length ; }
|
org . junit . Assert . assertEquals ( 0 , errors . size ( ) )
|
testMultiCellGetJSON ( ) { java . lang . String row_5_url = ( ( ( ( "/" + ( org . apache . hadoop . hbase . rest . TestMultiRowResource . TABLE ) ) + "/" ) + ( org . apache . hadoop . hbase . rest . TestMultiRowResource . ROW_1 ) ) + "/" ) + ( org . apache . hadoop . hbase . rest . TestMultiRowResource . COLUMN_1 ) ; java . lang . String row_6_url = ( ( ( ( "/" + ( org . apache . hadoop . hbase . rest . TestMultiRowResource . TABLE ) ) + "/" ) + ( org . apache . hadoop . hbase . rest . TestMultiRowResource . ROW_2 ) ) + "/" ) + ( org . apache . hadoop . hbase . rest . TestMultiRowResource . COLUMN_2 ) ; java . lang . StringBuilder path = new java . lang . StringBuilder ( ) ; path . append ( "/" ) ; path . append ( org . apache . hadoop . hbase . rest . TestMultiRowResource . TABLE ) ; path . append ( "/multiget/?row=" ) ; path . append ( org . apache . hadoop . hbase . rest . TestMultiRowResource . ROW_1 ) ; path . append ( "&row=" ) ; path . append ( org . apache . hadoop . hbase . rest . TestMultiRowResource . ROW_2 ) ; org . apache . hadoop . hbase . rest . TestMultiRowResource . client . post ( row_5_url , Constants . MIMETYPE_BINARY , org . apache . hadoop . hbase . util . Bytes . toBytes ( org . apache . hadoop . hbase . rest . TestMultiRowResource . VALUE_1 ) ) ; org . apache . hadoop . hbase . rest . TestMultiRowResource . client . post ( row_6_url , Constants . MIMETYPE_BINARY , org . apache . hadoop . hbase . util . Bytes . toBytes ( org . apache . hadoop . hbase . rest . TestMultiRowResource . VALUE_2 ) ) ; org . apache . hadoop . hbase . rest . client . Response response = org . apache . hadoop . hbase . rest . TestMultiRowResource . client . get ( path . toString ( ) , Constants . MIMETYPE_JSON ) ; "<AssertPlaceHolder>" ; org . apache . hadoop . hbase . rest . TestMultiRowResource . client . delete ( row_5_url ) ; org . apache . hadoop . hbase . rest . TestMultiRowResource . client . delete ( row_6_url ) ; } getCode ( ) { return this . code ; }
|
org . junit . Assert . assertEquals ( response . getCode ( ) , 200 )
|
writeTest ( ) { final java . util . concurrent . CountDownLatch awaitLatch = new java . util . concurrent . CountDownLatch ( 1 ) ; io . netty . bootstrap . Bootstrap bootstrap = client ( ) ; bootstrap . connect ( com . navercorp . pinpoint . plugin . netty . NettyIT . webServer . getHostname ( ) , com . navercorp . pinpoint . plugin . netty . NettyIT . webServer . getListeningPort ( ) ) . addListener ( new io . netty . channel . ChannelFutureListener ( ) { @ com . navercorp . pinpoint . plugin . netty . Override public void operationComplete ( io . netty . channel . ChannelFuture future ) throws com . navercorp . pinpoint . plugin . netty . Exception { if ( future . isSuccess ( ) ) { io . netty . channel . Channel channel = future . channel ( ) ; channel . pipeline ( ) . addLast ( new io . netty . channel . SimpleChannelInboundHandler ( ) { @ com . navercorp . pinpoint . plugin . netty . Override protected void channelRead0 ( io . netty . channel . ChannelHandlerContext ctx , java . lang . Object msg ) throws com . navercorp . pinpoint . plugin . netty . Exception { awaitLatch . countDown ( ) ; } } ) ; io . netty . handler . codec . http . HttpRequest request = new io . netty . handler . codec . http . DefaultFullHttpRequest ( io . netty . handler . codec . http . HttpVersion . HTTP_1_1 , io . netty . handler . codec . http . HttpMethod . GET , "netty.address" 3 ) ; future . channel ( ) . writeAndFlush ( request ) ; } } } ) ; boolean await = awaitLatch . await ( 3000 , TimeUnit . MILLISECONDS ) ; "<AssertPlaceHolder>" ; com . navercorp . pinpoint . bootstrap . plugin . test . PluginTestVerifier verifier = com . navercorp . pinpoint . bootstrap . plugin . test . PluginTestVerifierHolder . getInstance ( ) ; verifier . printCache ( ) ; verifier . verifyTrace ( event ( "NETTY" , io . netty . bootstrap . Bootstrap . class . getMethod ( "netty.address" 1 , java . net . SocketAddress . class ) , annotation ( "netty.address" , com . navercorp . pinpoint . plugin . netty . NettyIT . webServer . getHostAndPort ( ) ) ) ) ; verifier . verifyTrace ( event ( "NETTY" , "io.netty.channel.DefaultChannelPromise.addListener(io.netty.util.concurrent.GenericFutureListener)" ) ) ; verifier . verifyTrace ( event ( "netty.address" 0 , "Asynchronous<sp>Invocation" ) ) ; verifier . verifyTrace ( event ( "NETTY_INTERNAL" , "io.netty.util.concurrent.DefaultPromise.notifyListenersNow()" ) ) ; verifier . verifyTrace ( event ( "NETTY_INTERNAL" , "io.netty.util.concurrent.DefaultPromise.notifyListener0(io.netty.util.concurrent.Future,<sp>io.netty.util.concurrent.GenericFutureListener)" ) ) ; verifier . verifyTrace ( event ( "NETTY" , "io.netty.channel.DefaultChannelPipeline.writeAndFlush(java.lang.Object)" ) ) ; verifier . verifyTrace ( event ( "NETTY_HTTP" , "netty.address" 2 , annotation ( "http.url" , "netty.address" 3 ) ) ) ; } await ( long , java . util . concurrent . TimeUnit ) { return latch . await ( timeout , timeUnit ) ; }
|
org . junit . Assert . assertTrue ( await )
|
testGenerateClassWithTemplate ( ) { org . eclipse . uml2 . uml . TemplateSignature templateSignature = mock ( org . eclipse . uml2 . uml . TemplateSignature . class ) ; org . eclipse . emf . common . util . EList < org . eclipse . uml2 . uml . TemplateParameter > templateParameters = mock ( org . eclipse . emf . common . util . EList . class , Answers . RETURNS_DEEP_STUBS . get ( ) ) ; when ( clazz . getOwnedTemplateSignature ( ) ) . thenReturn ( templateSignature ) ; when ( templateSignature . getParameters ( ) ) . thenReturn ( templateParameters ) ; org . eclipse . jdt . core . dom . AST ast = org . eclipse . jdt . core . dom . AST . newAST ( org . eclipse . jdt . core . dom . AST . JLS3 ) ; org . eclipse . jdt . core . dom . CompilationUnit cu = ast . newCompilationUnit ( ) ; org . eclipse . jdt . core . dom . TypeDeclaration td = ast . newTypeDeclaration ( ) ; td . setInterface ( true ) ; org . eclipse . jdt . core . dom . Modifier modifier = ast . newModifier ( org . eclipse . jdt . core . dom . Modifier . ModifierKeyword . PUBLIC_KEYWORD ) ; td . modifiers ( ) . add ( modifier ) ; td . setName ( ast . newSimpleName ( "Company" ) ) ; org . eclipse . jdt . core . dom . TypeDeclaration typeDeclaration = interfaceGenerator . generateClass ( clazz , ast , cu ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( "AddressImpl<sp>[oldAddress=" + ( oldAddress ) ) + ",<sp>street=" ) + ( street ) ) + ",<sp>person=" ) + ( person . getName ( ) ) ) + "]" ; }
|
org . junit . Assert . assertEquals ( typeDeclaration . toString ( ) , td . toString ( ) )
|
adminProjectKylinWithoutPermission ( ) { org . apache . kylin . metadata . project . ProjectInstance project = org . apache . ranger . authorization . kylin . authorizer . RangerKylinAuthorizerTest . name2Projects . get ( org . apache . ranger . authorization . kylin . authorizer . RangerKylinAuthorizerTest . KYLIN_PROJECT ) ; boolean result = aclEvaluate . hasProjectAdminPermission ( project ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertFalse ( result )
|
removeHiddenFrozenColumn ( ) { lengthColumn . setHidden ( true ) ; grid . setFrozenColumnCount ( 3 ) ; grid . removeColumn ( lengthColumn ) ; "<AssertPlaceHolder>" ; } getFrozenColumnCount ( ) { return columnConfiguration . getFrozenColumnCount ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , grid . getFrozenColumnCount ( ) )
|
testTxConflictHandling ( ) { int nFriendsBefore ; try ( com . syncleus . ferma . tx . Tx tx = db . tx ( ) ) { p = addPersonWithFriends ( tx . getGraph ( ) , "Person2" ) ; manipulatePerson ( tx . getGraph ( ) , p ) ; tx . success ( ) ; nFriendsBefore = p . getFriends ( ) . size ( ) ; } java . util . concurrent . CyclicBarrier b = new java . util . concurrent . CyclicBarrier ( 3 ) ; addFriendToPerson ( p , b ) ; addFriendToPerson ( p , b ) ; b . await ( ) ; java . lang . Thread . sleep ( 1000 ) ; try ( com . syncleus . ferma . tx . Tx tx = db . tx ( ) ) { p = tx . getGraph ( ) . getFramedVertexExplicit ( com . gentics . mesh . graphdb . orientdb . graph . Person . class , p . getId ( ) ) ; int nFriendsAfter = p . getFriends ( ) . size ( ) ; "<AssertPlaceHolder>" ; } } size ( ) { return ( bulkEntries . size ( ) ) + ( seperateEntries . size ( ) ) ; }
|
org . junit . Assert . assertEquals ( ( nFriendsBefore + 2 ) , nFriendsAfter )
|
testFastRerouteObjectParser1 ( ) { final org . opendaylight . protocol . rsvp . parser . impl . te . FastRerouteObjectParser parser = new org . opendaylight . protocol . rsvp . parser . impl . te . FastRerouteObjectParser ( ) ; final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . rsvp . rev150820 . RsvpTeObject obj = parser . parseObject ( io . netty . buffer . Unpooled . copiedBuffer ( org . opendaylight . protocol . util . ByteArray . subByte ( TEObjectUtil . TE_LSP_FAST_REROUTE1 , 4 , ( ( TEObjectUtil . TE_LSP_FAST_REROUTE1 . length ) - 4 ) ) ) ) ; final io . netty . buffer . ByteBuf output = io . netty . buffer . Unpooled . buffer ( ) ; parser . serializeObject ( obj , output ) ; "<AssertPlaceHolder>" ; } getAllBytes ( io . netty . buffer . ByteBuf ) { return org . opendaylight . protocol . util . ByteArray . getBytes ( buffer , buffer . readableBytes ( ) ) ; }
|
org . junit . Assert . assertArrayEquals ( TEObjectUtil . TE_LSP_FAST_REROUTE1 , org . opendaylight . protocol . util . ByteArray . getAllBytes ( output ) )
|
testCanNotGetAccessToGradeDueToStudentSectionAssociationLookup ( ) { org . slc . sli . api . security . context . validator . Set < java . lang . String > grades = new org . slc . sli . api . security . context . validator . HashSet < java . lang . String > ( ) ; org . slc . sli . api . security . context . validator . Map < java . lang . String , java . lang . Object > association = buildStudentSectionAssociation ( "student123" , "section123" , org . joda . time . DateTime . now ( ) . minusDays ( 3 ) ) ; org . slc . sli . domain . Entity studentSectionAssociation = new org . slc . sli . domain . MongoEntity ( org . slc . sli . common . constants . EntityNames . STUDENT_SECTION_ASSOCIATION , association ) ; org . slc . sli . domain . Entity gradeEntity = helper . generateGrade ( studentSectionAssociation . getEntityId ( ) ) ; grades . add ( gradeEntity . getEntityId ( ) ) ; org . mockito . Mockito . when ( mockRepo . findAll ( org . mockito . Mockito . eq ( EntityNames . GRADE ) , org . mockito . Mockito . any ( org . slc . sli . domain . NeutralQuery . class ) ) ) . thenReturn ( org . slc . sli . api . security . context . validator . Arrays . asList ( gradeEntity ) ) ; org . mockito . Mockito . when ( mockRepo . findAll ( org . mockito . Mockito . eq ( EntityNames . STUDENT_SECTION_ASSOCIATION ) , org . mockito . Mockito . any ( org . slc . sli . domain . NeutralQuery . class ) ) ) . thenReturn ( new org . slc . sli . api . security . context . validator . ArrayList < org . slc . sli . domain . Entity > ( ) ) ; "<AssertPlaceHolder>" ; } validate ( java . lang . String , org . slc . sli . api . security . context . validator . Set ) { if ( ! ( areParametersValid ( EntityNames . STAFF , entityName , staffIds ) ) ) { return Collections . EMPTY_SET ; } org . slc . sli . api . security . context . validator . Set < java . lang . String > validIds = new org . slc . sli . api . security . context . validator . HashSet < java . lang . String > ( ) ; org . slc . sli . domain . NeutralQuery basicQuery = new org . slc . sli . domain . NeutralQuery ( new org . slc . sli . domain . NeutralCriteria ( "staffReference" , org . slc . sli . domain . NeutralCriteria . CRITERIA_IN , staffIds ) ) ; basicQuery . setIncludeFields ( org . slc . sli . api . security . context . validator . Arrays . asList ( "educationOrganizationReference" , "staffReference" ) ) ; org . slc . sli . api . security . context . validator . TransitiveStaffToStaffValidator . LOG . info ( "Attempting<sp>to<sp>validate<sp>transitively<sp>from<sp>staff<sp>to<sp>staff<sp>with<sp>ids<sp>{}" , staffIds ) ; injectEndDateQuery ( basicQuery ) ; java . lang . Iterable < org . slc . sli . domain . Entity > edOrgAssoc = repo . findAll ( EntityNames . STAFF_ED_ORG_ASSOCIATION , basicQuery ) ; org . slc . sli . api . security . context . validator . Map < java . lang . String , org . slc . sli . api . security . context . validator . Set < java . lang . String > > staffEdorgMap = new org . slc . sli . api . security . context . validator . HashMap < java . lang . String , org . slc . sli . api . security . context . validator . Set < java . lang . String > > ( ) ; populateMapFromMongoResponse ( staffEdorgMap , edOrgAssoc ) ; org . slc . sli . api . security . context . validator . Set < java . lang . String > edOrgLineage = getStaffEdOrgLineage ( ) ; if ( ( edOrgLineage . isEmpty ( ) ) || ( staffEdorgMap . isEmpty ( ) ) ) { return Collections . EMPTY_SET ; } for ( java . util . Map . Entry < java . lang . String , org . slc . sli . api . security . context . validator . Set < java . lang . String > > entry : staffEdorgMap . entrySet ( ) ) { org . slc . sli . api . security . context . validator . Set < java . lang . String > tmpSet = new org . slc . sli . api . security . context . validator . HashSet < java . lang . String > ( entry . getValue ( ) ) ; tmpSet . retainAll ( edOrgLineage ) ; if ( ( tmpSet . size ( ) ) != 0 ) { validIds . add ( entry . getKey ( ) ) ; } } validIds . addAll ( validateThrough ( EntityNames . STAFF_PROGRAM_ASSOCIATION , "programId" ) ) ; validIds . addAll ( validateThrough ( EntityNames . STAFF_COHORT_ASSOCIATION , "cohortId" ) ) ; basicQuery = new org . slc . sli . domain . NeutralQuery ( new org . slc . sli . domain . NeutralCriteria ( "_id" , "in" , edOrgLineage ) ) ; java . lang . Iterable < org . slc . sli . domain . Entity > edorgs = repo . findAll ( EntityNames . EDUCATION_ORGANIZATION , basicQuery ) ; org . slc . sli . api . security . context . validator . List < java . lang . String > programs = new org . slc . sli . api . security . context . validator . ArrayList < java . lang . String >
|
org . junit . Assert . assertFalse ( validator . validate ( EntityNames . GRADE , grades ) . equals ( grades ) )
|
testCreate ( ) { org . oscarehr . common . model . MessageTbl entity = new org . oscarehr . common . model . MessageTbl ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
|
org . junit . Assert . assertNotNull ( entity . getId ( ) )
|
getExceptionMessage ( ) { java . lang . String actual = messages . getExceptionMessage ( 1 ) ; java . lang . String expected = messages . getMessage ( "exception.1" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testAntTypeTest ( ) { buildRule . executeTarget ( "antTypeTest" ) ; "<AssertPlaceHolder>" ; } getLog ( ) { return mLog ; }
|
org . junit . Assert . assertEquals ( "" , buildRule . getLog ( ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.