test_class.declarator: dateFormat = new SimpleDateFormat("yyyy-MM-d")
test_class.modifier: private static
test_class.original_string: private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-d");
test_class.type: SimpleDateFormat
test_class.var_name: dateFormat
test_class.file: app/src/test/java/com/romainpiel/bitcointracker/network/BPIServiceClientTest.java
test_class.identifier: BPIServiceClientTest
test_case.body: @Test
      public void getCurrentUSDPrice_oneNext() throws ParseException {
          Date date = newDate(1);
          float rate = 2.3456f;
  
          BPIService service = mock(BPIService.class);
          when(service.currentPrice()).thenReturn(Observable.from(new PriceDto[]{
                  newUSDPrice(date, rate)
          }));
          BPIServiceClient client = new BPIServiceClient(service);
  
          TestSubscriber<BPI> subscriber = new TestSubscriber<>();
          client.getCurrentUSDPrice().subscribe(subscriber);
  
          List<BPI> expectedResults = Lists.newArrayList(
                  new BPI(date, rate)
          );
          subscriber.assertReceivedOnNext(expectedResults);
          subscriber.assertTerminalEvent();
          subscriber.assertNoErrors();
      }
test_case.class_method_signature: BPIServiceClientTest.getCurrentUSDPrice_oneNext()
test_case.full_signature: @Test public void getCurrentUSDPrice_oneNext()
test_case.identifier: getCurrentUSDPrice_oneNext
test_case.invocations: newDate mock thenReturn when currentPrice from newUSDPrice subscribe getCurrentUSDPrice newArrayList assertReceivedOnNext assertTerminalEvent assertNoErrors
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getCurrentUSDPrice_oneNext()
focal_class.declarator: bpiService
focal_class.modifier: private
focal_class.original_string: private BPIService bpiService;
focal_class.type: BPIService
focal_class.var_name: bpiService
focal_class.file: app/src/main/java/com/romainpiel/bitcointracker/network/BPIServiceClient.java
focal_class.identifier: BPIServiceClient
focal_class.class_method_signature: BPIServiceClient.BPIServiceClient(BPIService bpiService)
focal_class.full_signature: public  BPIServiceClient(BPIService bpiService)
focal_class.identifier: BPIServiceClient
focal_class.modifiers: public
focal_class.parameters: (BPIService bpiService)
focal_class.signature:  BPIServiceClient(BPIService bpiService)
focal_class.class_method_signature: BPIServiceClient.getCurrentUSDPrice()
focal_class.full_signature: public Observable<BPI> getCurrentUSDPrice()
focal_class.identifier: getCurrentUSDPrice
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Observable<BPI>
focal_class.signature: Observable<BPI> getCurrentUSDPrice()
focal_class.class_method_signature: BPIServiceClient.getHistory()
focal_class.full_signature: public Observable<List<BPI>> getHistory()
focal_class.identifier: getHistory
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Observable<List<BPI>>
focal_class.signature: Observable<List<BPI>> getHistory()
focal_method.body: public Observable<BPI> getCurrentUSDPrice() {
          return bpiService.currentPrice().map(new Func1<PriceDto, BPI>() {
              @Override
              public BPI call(PriceDto priceDto) {
                  return new BPI(priceDto.getTime().getUpdatedISO(), priceDto.getBpi().get("USD").getRate());
              }
          });
      }
focal_method.class_method_signature: BPIServiceClient.getCurrentUSDPrice()
focal_method.full_signature: public Observable<BPI> getCurrentUSDPrice()
focal_method.identifier: getCurrentUSDPrice
focal_method.invocations: map currentPrice getUpdatedISO getTime getRate get getBpi
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: Observable<BPI>
focal_method.signature: Observable<BPI> getCurrentUSDPrice()